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

2023-03-05,,

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

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的相关教程结束。

《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.doc》

下载本文的Word格式文档,以方便收藏与打印。