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

When using the GitHub app for Mac (version 87) I received the following error:

git: 'credential-osxkeychain' is not a git command. See "git --help".

Error: The requested URL returned an error: 403 while accessing https://github.com/[PROJECT URL] / info / refs

fatal: HTTP request failed (256)

The git command line tools (version 1.8.0) are installed in /usr/local/git/bin and the git-credential-osxkeychain are correctly installed on /usr/local/git/bin .

How can I solve this error?

+17
github-for-mac
Dec 01
source share
10 answers

The source of this problem is that GitHub for Mac uses a different directory path for its executables than 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 an error because it cannot find the git -credential-osxkeychain executable.

To solve the problem:

  • Launch terminal
  • Create a symlink for git -credential-osxkeychain from Dir command-line tools in 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

+10
Dec 02
source share

enter image description here

When I tried to run this command, there was no error

 brew untap homebrew/homebrew-dupes 
+6
Apr 12 '19 at 6:03
source share

this always happens with the source tree application and the solution that you change to use the git system, and not the built-in git with the source tree, because the source tree uses an older version or you can update the settings using the path to the git executable, and you should find it in / usr / bin / git, or you can print which git and specify that your source tree application use it

+3
Nov 04 '13 at 21:18
source share

I had to do sudo ln -s /usr/local/git/bin/git-credential-osxkeychain /usr/bin/git-credential-osxkeychain because I updated git and then copied / usr / local / git / bin / git in / usr / bin / git

+1
Feb 26 '15 at 19:27
source share

http://backlogtool.com/git-guide/cn/reference/trouble-shooting.html

HTTPS requires passwords every time you do push / pull, if you are Windows, only the first time

but on Mac, you can use the keychain authentication assistant. Users using Homebrew automatically install authentication assistants when installing Git. In addition, you need to install manually.

If you want to make sure that you have an installation certification assistant, you can use the following command to confirm.

git credential-osxkeychain

If the authentication assistant is not installed, the following content is displayed.

git: 'credential-osxkeychain' is not a git command. See 'git --help'.

At this point, you can download the authentication assistant in the right way.

  1. curl -s -O http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
  2. chmod u+x git-credential-osxkeychain
  3. mv git-credential-osxkeychain/usr/local/bin

After installation, install the open authentication assistant.

  1. git config --global credential.helper osxkeychain
+1
Jun 27 '17 at 15:35
source share

Customization

/ Usr / local / git / bin / git-credential-osxkeychain

in your way also works or wherever your path may be.

I'm not sure which solution is preferable.

0
Nov 25 '13 at 9:20
source share

After that, with one of my colleagues, we were able to decide by simply updating SourceTree to the latest version.

For future viewers, before following the path of a symbolic link, make sure that you have automatic updates for the source tree (preferences → update tab), and then check for updates (in the pop-up menu in the source tree menu)

0
Dec 17 '13 at 22:41
source share

Try: git config --global credential.helper git

0
Jun 27. '18 at 7:38
source share

git: 'credential-osxkeychain' is not a git command. See 'git --help'. this error message disappeared after I updated git with

 brew upgrade git ==> Upgrading 1 outdated package: git 2.11.1 -> 2.21.0 
0
Mar 08 '19 at 9:16
source share

If you encounter this problem while using brew update , try

 brew update --debug --verbose 

You can see a detailed log and find the real reason.

0
Jul 05 '19 at 15:03
source share



All Articles