将OS X钥匙串与Git一起使用(locate命令无济于事) [英] Using OS X keychain with Git (locate command not helping)
问题描述
我正在运行OSX 10.10.
I am running OSX 10.10.
我正在尝试在Git中缓存我的GitHub密码.我目前正在按照@ https://help提供的说明进行操作.github.com/articles/caching-your-github-password-in-git/.我的OS X凭据帮助器已经安装.我在将辅助程序安装到Git本身所在的目录中遇到错误.
I am trying to cache my GitHub password in Git. I am currently following the instructions provided @ https://help.github.com/articles/caching-your-github-password-in-git/. My OS X credential helper is already installed. I am running into an error installing the helper into the same directory where Git itself is installed.
即使我尝试使用locate命令来定位我的钥匙串,我仍然会收到没有这样的文件或目录"错误消息.这是我的终端返回的内容:
Even though I have tried to use the locate command to locate my keychain, I am still receiving the "No such file or directory" error message. Here is what my terminal is returning:
$ locate git-credential-osxkeychain
/Applications/GitHub Desktop.app/Contents/Resources/git/bin/git-credential-osxkeychain
/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-credential-osxkeychain
/Library/Developer/CommandLineTools/usr/libexec/git-core/git-credential-osxkeychain
/usr/local/git/bin/git-credential-osxkeychain
$ sudo mv git-credential-osxkeychain \ "/usr/local/git/bin/git-credential-osxkeychain"
mv: rename git-credential-osxkeychain to /usr/local/git/bin/git-credential-osxkeychain: No such file or directory
推荐答案
看起来 git-credential-osxkeychain
二进制文件已经在/usr/local/git/bin/
-您不必将其移到那里.
It looks like the git-credential-osxkeychain
binary already is in /usr/local/git/bin/
- you shouldn't have to move it there.
请尝试以下操作:
首先通过运行来验证 git-credential-osxkeychain
在您的路径上
First verify whether git-credential-osxkeychain
is already on your path by running
which git-credential-osxkeychain
如果二进制文件在您的路径上,它将打印位置,例如/usr/local/git/bin/git-credential-osxkeychain
If the binary is on your path, it will print the location, e.g. /usr/local/git/bin/git-credential-osxkeychain
如果它显示路径,那么您应该能够配置git来使用它:
If it prints the path, then you should be able to configure git to use it:
git config --global credential.helper osxkeychain
如果 which
命令未找到 git-credential-osxkeychain
二进制文件,则需要将其移动到路径上的目录,或添加/usr/local/git/bin
到$ PATH变量.
If the which
command does not find the git-credential-osxkeychain
binary, you need to move it to a directory on your path, or add the /usr/local/git/bin
to your $PATH variable.
这篇关于将OS X钥匙串与Git一起使用(locate命令无济于事)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!