Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地仓库push到github远程仓库报错 #45

Open
aermin opened this issue Apr 8, 2018 · 0 comments
Open

本地仓库push到github远程仓库报错 #45

aermin opened this issue Apr 8, 2018 · 0 comments

Comments

@aermin
Copy link
Owner

aermin commented Apr 8, 2018

我在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."

image

image

原因:由于远程库是空的,不能直接git push

解决办法

终端执行以下命令行

git push -u origin master

然后输入你github的username 和 password

然后以后可以直接用git push 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant