remote: Permission to user_name/Code.git denied to other_user_name. fatal: unable to access 'https://github.com/user_name/Code.git/': The requested URL returned error: 403

Error msg:

$ git push
remote: Permission to xxx/Code.git denied to xxxxxx.
fatal: unable to access 'https://github.com/xxx/Code.git/': The requested URL returned error: 403

  

原因:

  账号切换, git安全机制导致

解决:

  git remote set-url origin git@github.com:用户名/仓库名.git

posted @ 2018-11-10 14:50  HPCM  阅读(481)  评论(0编辑  收藏  举报