解决github push错误The requested URL returned error: 403 Forbidden while accessing
发布日期:2021-06-29 11:22:05 浏览次数:2 分类:技术文章

本文共 486 字,大约阅读时间需要 1 分钟。

github push错误:

[html]
  1. git push  
  2. 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

修改

[plain]
  1. [remote "origin"]  
  2.     url = https://github.com/username/example.git  
为:
[plain]
  1. [remote "origin"]  
  2.     url = https://username@github.com/username/example.git  

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

或者修改为

  1. [remote "origin"]  
  2.     url = https://username:password@github.com/username/example.git
也可以解决 并且省去了输入密码一步

转载地址:https://blog.csdn.net/zxp3817100/article/details/50826957 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Git 命令大全
下一篇:GIT LINUX下基本操作

发表评论

最新留言

路过按个爪印,很不错,赞一个!
[***.219.124.196]2024年04月20日 06时52分44秒