2015-09-09 61 views
1

我正在运行OSX 10.10。使用OS X钥匙串与Git(找到命令不帮)

我想在Git中缓存我的GitHub密码。我目前遵循@https://help.github.com/articles/caching-your-github-password-in-git/提供的说明。我的OS X凭据助手已经安装。我遇到了一个错误安装助手到Git本身安装在同一个目录。

即使我试图使用locate命令来定位我的钥匙串,但我仍然收到“No such file or directory”错误消息。这里是我的终端返回:

$ 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 
+0

我会离开github应用程序交互使用并通过Macports或Homebrew安装'git'。这样你就可以获得一个可以保持自己更新的系统。 – trojanfoe

回答

0

它看起来像git-credential-osxkeychain二元已经是/usr/local/git/bin/ - 你不应该有移动。

请尝试以下方法:

首先确认git-credential-osxkeychain是否已经在你的路径上运行

which git-credential-osxkeychain 

如果二进制是你的路径上,将打印的位置,例如/usr/local/git/bin/git-credential-osxkeychain

如果打印路径,那么你应该能够配置git的使用它:

git config --global credential.helper osxkeychain 

如果which命令没有找到git-credential-osxkeychain二进制,你需要将它移动到一个目录你的路径,或者将/usr/local/git/bin添加到你的$ PATH变量中。

+0

它的工作!谢谢! –