blog
blog copied to clipboard
本地仓库push到github远程仓库报错
我在github上creat一个新的repo
然后把这个repo拉到我的电脑本地
然后提交了几个commit
然后要把本地库的内容推送到远程,用git push命令(期间还尝试了github客户端push)
结果报错
"Authentication failed. You may not have permission to access the repository. Open preferences and verify that you're signed in with an account that has permission to access this repository."
原因
:由于远程库是空的,不能直接git push
解决办法
:
终端执行以下命令行
git push -u origin master
然后输入你github的username 和 password
然后以后可以直接用git push 了