How to update a password in my terminal?

I changed a password on Github via the settings. After that, I changed the URL link to the remote repo exectuted:  git remote set-url origin  and  git push. The last command asked for a password and I entered the new one, but it reported an error to me: remote: Invalid username or password. fatal: Authentication failed for '’. 

That is, is it refers yet to the old password? How to fix it?


Hi @andrey2470t 

That depends on where the password has been stored. It could be in .git/config in the repository, or in a credential helper. You can run git config credential.helper to see which one you use.

Theres nothing about my current password in config file. And also git config credential.helper` doesnt derive anything to the terminal.

Hi @andrey2470t, thank you for being here! I think clearing your credentials and re adding them again might help.

To delete:

To add again: