我試圖把我的項目的github的一個,和我不斷收到此錯誤:致命:當前分支主沒有上游分支
[email protected]:~/846156 (master) $ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
於是,我嘗試過了,得到這個:
[email protected]:~/846156 (master) $ git push --set-upstream origin master
fatal: Authentication failed
另一個stackoverflow線程建議我嘗試以下,結果令人失望。
[email protected]:~/846156 (master) $ git push -u origin master
fatal: Authentication failed
然後我嘗試這樣的:
[email protected]:~/846156 (master) $ git config remote.origin.push HEAD
[email protected]:~/846156 (master) $ git push
fatal: Authentication failed
任何提示?
回購必須存在於github _before_您可以推送到它。可以?你正在與克隆它的回購? – matt
我克隆了Github的repo,然後在自述文件中添加了1行,然後嘗試將其推回。 – user1524361