GitHub for Mac error: git: 'credential-osxkeychain' is not a git command

前端 未结 10 1120
日久生厌
日久生厌 2020-12-28 13:11

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

相关标签:
10条回答
  • 2020-12-28 14:01

    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:

    1. Launch Terminal
    2. Create a Symbolic Link for git-credential-osxkeychain from Command Line Tools Dir to GitHub for Mac Dir

    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

    0 讨论(0)
  • 2020-12-28 14:03

    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

    0 讨论(0)
  • 2020-12-28 14:05

    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)

    0 讨论(0)
  • 2020-12-28 14:11

    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.

    0 讨论(0)
提交回复
热议问题