github-cli

github git-credential: "erase" operation not supported


I have some trouble with the github repository I am working on. I just realised I am 3 commits ahead of main and wanted to push, but the terminal prompted the following:

git push
gh auth git-credential: "erase" operation not supported
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/name/project/'

Has anyone encountered this before and can help?

Many thanks


Solution

  • You need to re-authenticate with GitHub. Run the following command and follow the prompts.

    gh auth login