Skip to content

Git credential helper error with Homebrew #2995

@mislav

Description

@mislav

After using gh auth login and choosing HTTPS mode to authenticate git with GitHub, brew update prints this warning:

$ brew update
gh auth git-credential get: gh: command not found
fatal: could not read Username for 'https://github.com': terminal prompts disabled

This is because gh sets this up in the global gitconfig:

[credential "https://github.com"]
	helper = !gh auth git-credential

The gh binary is to be found in /usr/local/bin/gh when installed with Homebrew. However, when running brew commands, the PATH does not include /usr/local/bin.

A potential solution would be to reference gh by its full path from git credential configuration.

Ref. #2449

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions