Android Studio 清除GitHub账号密码

2019-04-22  本文已影响0人  梵依然

如果你的电脑本来就有.gitconfig文件, 找到下面这句话删除,保存退出。

[credential]   helper = xxx

这个时候输入命令

git config credential.helper

查看本机的credential 是否已经被清空。

如果输入了 git config credential.helper 命令之后还是出现了osxkeychain, store 或者 cache 等,说明 git 的配置还是没有被清空,我参考了stackOverFlow上这个问题 有人给了这样一个命令查看 credential.helper 所在的文件目录(可能一个电脑上有多个.gitconfig文件),

git config --show-origin --get credential.helper 
file:/Applications/Xcode.app/Contents/Developer/usr/share/git-core/gitconfig    osxkeychain

如果你的Mac上还有Xcode的话,那么Xcode中还会有一个.gitconfig文件,找出他然后打开,清空[credential]。

再次输入

git config credential.helper 

如果没有任何反应,那么 credential 就是已经清空了

上一篇下一篇

猜你喜欢

热点阅读