我试图把我的项目的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