赞
踩
403 :直接下结论,无权限
导致原因:Git客户端缓存了之前的密码。
https方式每次都要输入密码,之前设置了记住密码导致。
设置记住密码(默认15分钟):
git config --global credential.helper cache
想自定义设置,可以这样:
git config credential.helper 'cache --timeout=3600'
想长期保存密码:
git config --global credential.helper store
方法一:远程访问的地址直接带上用户名密码**(推荐)**
http://yourname:password@git.oschina.net/name/project.git (ssh)
https://sm72:sha4@gitee.com/smm16872/soty_ui.git (https)
方法二:删掉之前 git 保存的账号和密码。回到每次输入用户名和密码。
rm ~/.git-credentials
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。