github push错误: 

git push
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/wangz/future.git/info/refs

git version 1.7.1

OS:CENTOS

解决方案:

vim .git/config

在你的当前目录里面有一个隐藏文件.git(前面有一点),这个里面有个config文件,里面有一个url的值,需要把github.com这域名前面的字母改成你的名字

修改 

[remote "origin"]
	url = https://github.com/wangz/example.git

为:

[remote "origin"]
wangz@github.com/wangz/example.git
红色部分改成你注册github时的名字就可以了。

再次git push,弹出框输入密码,即可提交

相关文章:

  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-10
  • 2022-12-23
  • 2021-12-26
  • 2021-05-27
  • 2021-12-14
  • 2021-06-14
  • 2022-12-23
相关资源
相似解决方案