Home > Net >  Github remote: Invalid username or password. fatal: Authentication failed
Github remote: Invalid username or password. fatal: Authentication failed

Time:03-25

I have generated a new access token, and I tried to clone a repo but got that error: Github remote: Invalid username or password. fatal: Authentication failed I tried multiple trials, I set the github token as: git config --global github.token mytoken and I opened my .gitconfig file to check it and found it correctly:

[user]
    name = {github user}
    email = {github email}
[github]
    token = {new token}
    
[credential]
    helper = store
[core]
    editor = vim

I even tried git config --global --unset-all user.password and I was expecting that it will ask me for te username and password (in this case, I would add token), but it didn't ask about neither the username nor password, and still when I try cloning I get the same error.

Is there anything I am missing that would help or something I need to check please?

CodePudding user response:

The issue was resolved by:

1- Control Panel

2-Credential Manager

3-Click Window Credentials

4- In Generic Credential section ,there would be git url, update username and password (in that case password is the new token)

5-Restart Git Bash and try for clone

CodePudding user response:

On my case I have uninstalled the source tree and reinstalled it. it's worked for me.

  • Related