git 删除 'credential-osxkeychain'
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11745504/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove 'credential-osxkeychain'
提问by Jared Zoneraich
I tried adding 'credential-osxkeychain' I followed these steps, but it has not installed correctly. I no longer want it. How can I stop git from calling it (when I do a pull)? Thank you!
我尝试添加 'credential-osxkeychain' 我遵循了这些步骤,但它没有正确安装。我不再想要了。我怎样才能阻止 git 调用它(当我拉时)?谢谢!
git pull
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
Username for 'https://github.com': jzone3
Password for 'https://[email protected]':
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
回答by Jared Zoneraich
I ended up deleting osxkeychain from the config file.
我最终从配置文件中删除了 osxkeychain。
git config --global --edit
回答by Alex Abreu
It seems MacPorts packages the keychain helper and that might be why it wasn't coming up as a recognized command for you.
MacPorts 似乎打包了钥匙串助手,这可能就是为什么它没有作为您认可的命令出现的原因。
You can install the helper directly by following these instructions:
您可以按照以下说明直接安装帮助程序:
via: Magnus Johansson @ http://insomniacgeek.com/how-to-add-your-git-password-in-the-mac-osx-keychain/
通过:马格努斯·约翰逊@ http://insomniacgeek.com/how-to-add-your-git-password-in-the-mac-osx-keychain/
In order to not having enter your git based password every time you perform a git operation, here's how you can store the git password in the Mac OSX keychain:
为了避免每次执行 git 操作时都输入基于 git 的密码,以下是将 git 密码存储在 Mac OSX 钥匙串中的方法:
Check if you have the credential-osxkeychain helper already installed:
检查您是否已经安装了 credential-osxkeychain 助手:
git credential-osxkeychain
git 凭证-osxkeychain
If not, the download and install it:
如果没有,请下载并安装它:
curl http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain-o git-credential-osxkeychain sudo mv git-credential-osxkeychain /usr/local/bin sudo chmod u+x /usr/local/bin/git-credential-osxkeychain
curl http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain-o git-credential-osxkeychain sudo mv git-credential-osxkeychain /usr/local/bin sudo chmod u+x / usr/local/bin/git-credential-osxkeychain
And make git use the helper:
并让 git 使用 helper:
git config --global credential.helper osxkeychain
git config --global credential.helper osxkeychain
回答by Matías Tapia
git config --global --remove-section credential
git config --global --remove-section 凭证