github提交代碼403

Github彷佛只支持ssh方式來讀取和寫入repo,儘管https方式也顯示「Read&Write」。git

所以,您須要將PC上的repo配置更改成ssh方式:github

          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上同步你的回購
相關文章
相關標籤/搜索