user11286508
user11286508

Reputation:

Github authentication failed

I have a problem I changed my email address for my Github account, and I kept the old one, but the new one as a primary. I tried to push a code and I receive this error:

remote: Invalid username or password.
fatal: Authentication failed......

How can I solve this problem, please note that I'm using a mac.

Upvotes: 0

Views: 12607

Answers (2)

danitrod
danitrod

Reputation: 431

Make sure you are entering a Personal Access Token, not your GitHub account password. Take a look at this blog: https://medium.com/@ginnyfahs/github-error-authentication-failed-from-command-line-3a545bfd0ca8

Upvotes: 4

SwissCodeMen
SwissCodeMen

Reputation: 4875

Remove the credentials from yours github-account in credential manager (finding by searching "Credential Manager") and by execute the next command to your github-server (as example git pull) you will be asked to log into github, where you have to use the new email. After login, the credentials for your github-account are changed and saved again in the credential manager.

Upvotes: 1

Related Questions