$ git push -u origin master

问题描述:
remote: Permission to name/project-name.git denied to your-name.
fatal: unable to access 'https://github.com/author-name/project-name.git/': The requested URL returned error: 403

问题说明:git在 pull/push 代码的时候提示上述问题,这表示我们没有权限来pull/push相关代码

解决方法:

1、执行git config --list,查看git的配置信息,可以看到自己的remote.origin.url地址指向

2,,执行 git remote set-url origin https://github.com/your-git-name/your-git-project-name 将地址转换成你的远程地址

3,ok了


 

猜你喜欢

转载自blog.csdn.net/weixin_40918145/article/details/84101444