当前位置:   article > 正文

Git clone 报错:403 解决方案_git clone 403

git clone 403

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
解决办法:

方法一:远程访问的地址直接带上用户名密码**(推荐)**

http://yourname:password@git.oschina.net/name/project.git (ssh)

https://sm72:sha4@gitee.com/smm16872/soty_ui.git  (https)
  • 1
  • 2
  • 3

方法二:删掉之前 git 保存的账号和密码。回到每次输入用户名和密码。

rm ~/.git-credentials
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/454551
推荐阅读
相关标签
  

闽ICP备14008679号