When using the GitHub for Mac app (version 87), I received the following error:
git: \'credential-osxkeychain\' is not a git command. See \'git --help
The source of this problem is that GitHub for Mac uses a different directory path for its executables than the Command Line Tools.
GitHub for Mac: /Applications/GitHub.app/Contents/Resources/git/bin
Command Line Tools: /usr/local/git/bin/
So when GitHub for Mac tries to Sync a Branch it presents the error because it can not find git-credential-osxkeychain executable file.
To solve the problem:
ln -s <git-command-line-tools dir path>/git-credential-osxkeychain <github for mac path>/git-credential-osxkeychain
This is the command I used on my system:
ln -s /usr/local/git/bin/git-credential-osxkeychain /Applications/GitHub.app/Contents/Resources/git/bin/git-credential-osxkeychain
this always happens with source tree app and the solution that you change the settings to use the system git not the embedded git with source-tree because source tree is using an older version or you can update the settings with the path to git executable and you should find it in /usr/bin/git or you can print which git and point your Source tree app to use it
After having worked through this with one of my colleagues we were able to resolve by simply updating SourceTree to the latest version.
For future viewers, before going down the symlink path, make sure you have automatic updates enabled for source tree (preferences->update tab), and then check for updates (in the source tree menu on macs)
If you meet this problem when use brew update
, try
brew update --debug --verbose
You can see the detail log, and find the real reason.