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

前端 未结 10 1167
日久生厌
日久生厌 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-credential-osxkeychain /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

提交回复
热议问题