我正在运行OSX 10.10。
我正在尝试在Git中缓存我的GitHub密码。我目前正在按照@ https://help.github.com/articles/caching-your-github-password-in-git/提供的说明进行操作。我的OS X凭据帮助器已经安装。我在将辅助程序安装到Git本身所在的目录中遇到错误。
即使我尝试使用locate命令来定位我的钥匙串,我仍然会收到“没有这样的文件或目录”错误消息。这是我的终端返回的内容:
$ 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/
-您不必将其移到那里。
请尝试以下操作:
首先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变量中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句