Skip to content

Instantly share code, notes, and snippets.

@usagimaru
Last active February 5, 2024 16:09
Show Gist options
  • Save usagimaru/1796c95a33abc41d2fbf40a8cdc47283 to your computer and use it in GitHub Desktop.
Save usagimaru/1796c95a33abc41d2fbf40a8cdc47283 to your computer and use it in GitHub Desktop.
macOS gitクライアントで「git: 'credential-osxkeychain' is not a git command. 」

credential-osxkeychain

gitでGitHub等へのアクセスの際に認証情報をmacOS Keychainに格納して参照できるようにするヘルパー。

https://docs.github.com/ja/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain

gitクライアントで「git: 'credential-osxkeychain' is not a git command.」

credential-osxkeychainを使う設定にしている場合、SourceTree, Fork, Towerなどのgitクライアントでこのエラーが生じる場合がある。 gitインスタンスを変更できる場合は、システムのgitを指定すると解決できる可能性がある。そうでない場合は各インスタンスが参照しているgitconfigにてosxkeychainを設定する必要があるかも。

ちなみにXcodeの場合はここ

Xcode.app/Contents/Developer/usr/share/git-core/gitconfig

gitconfigを表示:

git config --show-origin --get credential.helper

https://stackoverflow.com/questions/13661354/github-for-mac-error-git-credential-osxkeychain-is-not-a-git-command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment