I am learning to use GitHub and so far only from PyCharm. Recently, I updated my GitHub page with a new username, email and address. I changed the credentials in PyCharm going to Settings
>
Version control
>
Github
and running the test I do get the message successful connection. However, when I try to commit my projects I get a failed connection message as it tries to reach the old address. This is the message I get:
Push failed:
ProjectName: failed with error: Authentication failed for 'Old_Repositoriy_url'
It seems other users are experiencing a similar error, however, I do not know how to change my git credentials from the terminal...
I am using PyCharm 2017.2 in Ubuntu 16.04
Control Panel >> User Account >> Credential Manager >> Windows Credential >> Generic Credential >> look for any github cert/credential and delete it. then running any git command will prompt to enter new user name and password (Note: some times you will not be prompted for password for git pull).
From the main menu, choose VCS | Update Project or press Ctrl+T . The Update Project dialog opens. Select the update type (this strategy will be applied to all roots that are under Git version control): Merge the incoming changes into the current branch: select this option to perform merge during the update.
To update your credentials, go to Control Panel → Credential Manager → Generic Credentials. Find the credentials related to your Git account and edit them to use the updated password. This should be the accepted answer if git config --list contains credential.
You need to go to:
Settings -> Appearance and Behavior -> System Settings -> Passwords.
Then change it to "Do not save, forget passwords after start".
Now when you restart your IDE the issue should be solved (you will have to re-authenticate). If you want to save your new password just re-enable the option after a restart.
Pycharm can also be using the Windows credentials manager. So, if the accepted answer doesn't work and you're using Windoze, open the windows cm (type "credential manager" in the search box), select the "Windows Credentials" tab, expand the entry for your git repo, and click "Remove". You'll be prompted to re-enter the user/pwd the next time you access it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With