折騰了一早上最後一步都是remote:Invalid username or password;

fatal:Authentication failed for...(忘了),幫幫忙吧,求求了。。。



半小時學會上傳本地項目到github

點擊Uploadfile


要是不認識這幾個單詞也可以百度一下。這錯誤提示還不夠明顯?
為何不用GitHub for windows
【GIT】Github上傳本地代碼詳解 - leesf - 博客園從0開始學習 GitHub 系列之「向GitHub 提交代碼」

在Shell中依次輸入如下命令:

git init
git add Test/GitHubTest
git commit -m "GitHubTest"
git remote add origin https://github.com/leesf/Test.git
git push origin master

如果執行git remote add origin https://github.com/leesf/Test.git 出現錯誤:

  fatal: remote origin already exists則執行以下語句:  git remote rm origin再次執行git remote add origin https://github.com/leesf/Test.git即可。

在執行git push origin master時,報錯:

  error:failed to push som refs to.......則執行以下語句:  git pull origin master

先把遠程伺服器github上面的文件拉先來,再push 上去。


推薦閱讀:
相關文章