某个git仓库拉不了,大概率是缓存密码的问题
终端输入下面
git config credential.helper
git 使用 https 方式传输代码,一般会储存用户的用户名密码。
储存方式有三种:
缓存cache
硬盘store
钥匙串osxkeychain
这样就不用每次都输入一遍用户名密码。
执行这个命令查看自己系统支持的crendential
git help -a | grep credential
查看gitconfig里的credential helper设置
右键Finder选择前往文件夹输入
~/
找到隐藏文件.gitconfig,打开查看找到是否有
[credential]
helper = xxx
删掉,保存退出
然后终端键入
git config credential.helper
看是否为空了
然后
// 建议就使用osxkeychain了
git config --global credential.helper osxkeychain
然后,OK