2

I am using Gitlab via Pycharm (Windows 10) and when checking out an existing project from gitlab (using: VCS - Check out from version control - Git) it asks for user credentials.

I misspelled something in my username and/or password and it says "Authentification failed for ..." but when trying again it does not ask for the user and password again but immediately gives the same error message.

How can I re-enter user and password?

I followed this but it did not help as the error stays the same.

sun_jara
  • 1,736
  • 12
  • 20
lordy
  • 610
  • 15
  • 30

2 Answers2

2

If you are using MAC OS, you will need to delete the credentials from the KeyChain Access.

If you are using Windows, you will need to delete the credentials from Credential Manager -> Windows Credentials.

Git has a built-in credentials system that works in different OS environments. Git runs a daemon process that caches credentials, kill the process and it will prompt from credentials again or erase the credentials us erase command. Doc Link

If you are interested to know more about caching git credentials and how it works, check out this answer.

sun_jara
  • 1,736
  • 12
  • 20
  • Just to confirm, Are you using any native desktop client or git bash to execute git commands? – sun_jara Apr 14 '19 at 09:35
  • No, everything via PyCharm – lordy Apr 14 '19 at 09:37
  • Oh.. okay. Most probably you are running bash then. You can check which that by running `echo $SHELL` on PyCharm Terminal. I updated my answer for windows machine and also added a reference link to fix the issue for any OS. Hope it helps. – sun_jara Apr 14 '19 at 09:47
  • Where do I find the credential manager? It is not under File -> Settings in PyCharm and also not in Windows itself? "echo $SHELL" on the pyhcarm terminal returns just "SyntaxError: invalid syntax" ... – lordy Apr 14 '19 at 09:58
  • 1
    The credential manager must be under Windows Control Panel. Go to start and type credential manager. – sun_jara Apr 14 '19 at 10:04
  • 1
    Sorry, my bad - I am working on a non-english version of windows. It is called "Anmeldeinformationsverwaltung" here *shocked*. Works fine now! – lordy Apr 14 '19 at 10:06
  • Under PyCharm settings, search for shell path under Tools>Terminal. – sun_jara Apr 14 '19 at 10:07
1

This is actually a long-standing bug in the Microsoft Git Credential Manager (which is installed by default with Git for Windows).

As @sun_jara wrote, the workaround is to manually delete the credentials from the Windows Credential Manager.

OmerB
  • 4,134
  • 3
  • 20
  • 33