Search code examples
githubpycharm

Change GitHub credentials in PyCharm


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


Solution

  • 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.