美文网首页
Android Studio 清除GitHub账号密码

Android Studio 清除GitHub账号密码

作者: 梵依然 | 来源:发表于2019-04-22 15:48 被阅读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 就是已经清空了

    相关文章

      网友评论

          本文标题:Android Studio 清除GitHub账号密码

          本文链接:https://www.haomeiwen.com/subject/quzygqtx.html