git push fatal: unable to access : The requested URL returned error: 403错误
参考资料:https://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed我刚刚遇到了同样的问题,想出了是什么原因。Github 似乎只支持 ssh 方式来读写 repo,尽管 https 方式也显示了“读写”。因此,您需要将 PC 上的 rep
·
参考资料:https://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed
我刚刚遇到了同样的问题,想出了是什么原因:
Github 似乎只支持 ssh 方式来读写 repo,尽管 https 方式也显示了“读写”。
因此,您需要将 PC 上的 repo 配置更改为 ssh 方式:
-
编辑.git/configrepo 目录下的文件
-
url=在部分下找到条目[remote “origin”]
-
将其从 url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git 更改 为url=git@github.com/derekerdmann/lunch_call.git。也就是说,将@符号之前的所有文本更改为ssh://git 保存config文件并退出。
-
现在你可以用来git push origin master在 GitHub 上同步你的 repo
更多推荐
已为社区贡献1条内容
所有评论(0)