在sourceTree克隆 基本保存钥匙串哦
本地克隆的话 也是钥匙串
删除用户密码
也可能出现在修改密码情况,也需要先删除
Git 用户名和密码的存储是通过 credential helper(凭证)
实现的
- 缓存中找
- 磁盘中找
- 钥匙串中找
查看 credential
git help -a | grep credential
查看全局配置
git config --list
credential.helper=store 这是存store
打开gitconfig
文件
cat ~/.gitconfig
vi ~/.gitconfig
钥匙串 删除
gitclone 就提示输入密码了
保存
保存磁盘
git config --global credential.helper store
保存钥匙串
git config --global credential.helper osxkeychain
如果设置了 osxkeychain 后发现执行 Git 命令依然报 403 的错误,很有可能是原来的钥匙串没有被删掉,务必检查一下钥匙串中老的密码是否删除了