github提交代码403

Github似乎只支持ssh方式来读取和写入repo,尽管https方式也显示“Read&Write”。

因此,您需要将PC上的repo配置更改为ssh方式:

          cd到你的代码路径下vim .git/config
  1. 编辑.git/configr 目录下的文件
  2. 找到url=条目下的条目[remote "origin"]
  3. 将它url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git改为url=ssh://git@github.com/derekerdmann/lunch_call.git
  4. 也就是说,@符号前的所有文本更改为ssh://git
  5. 保存config文件并退出。现在你可以用来git push origin master在GitHub上同步你的回购
原文地址:https://www.cnblogs.com/wanhua-wu/p/9516262.html