2015-09-09 63 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

它的工作!謝謝! –