Git clone 报错:403 完美解决方案
直接上问题:
403 :直接下结论,无权限
导致原因:Git客户端缓存了之前的密码。
问题起源:
https方式每次都要输入密码,之前设置了记住密码导致。
设置记住密码(默认15分钟):
git config --global credential.helper cache
想自定义设置,可以这样:
git config credential.helper 'cache --timeout=3600'
想长期保存密码:
git config --global credential.helper store
解决办法:
方法一:远程访问的地址直接带上用户名密码**(推荐)**文章来源:https://www.toymoban.com/news/detail-841429.html
http://yourname:password@git.oschina.net/name/project.git (ssh)
https://sm72:sha4@gitee.com/smm16872/soty_ui.git (https)
方法二:删掉之前 git 保存的账号和密码。回到每次输入用户名和密码。文章来源地址https://www.toymoban.com/news/detail-841429.html
rm ~/.git-credentials
到了这里,关于Git clone 报错:403 解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!