0

I tried to clone my git repo with git extensions but entered the wrong credentials. Now I didn´t get any prompt anymore to change my login data. I´m just getting this error:

Clone failed
remote error: Invalid username or password.

How could I force git to show me the login prompt again? I think I have to clear the cache. How do I do it?

Lorenz
  • 51
  • 5
  • Tried this: `git remote set-url origin git@github.com:username/repository` – Ave Mar 03 '17 at 10:07
  • Possible duplicate of [How do I force git to prompt for credentials?](http://stackoverflow.com/questions/18947897/how-do-i-force-git-to-prompt-for-credentials) – utsav_deep Mar 03 '17 at 10:08
  • What operating system are you using? Have you tried closing command prompt and open it again? Maybe you just need a new session.. – balazs630 Mar 03 '17 at 10:08
  • im using windows. I also tried "git credential-cache exit" to delete the cache but it seems it is no valid command.... – Lorenz Mar 03 '17 at 10:19

2 Answers2

1

On Windows, To force GIT to re-prompt for username and password (that is you want to change one, the other, or both) you have to:

  1. Go to Control Panal
  2. Find and open Windows Credential Manager
  3. In the Generic Credentials list, find an entry for the GIT host you are working with
  4. Click the option to "Remove from Vault"

The next time you try "git clone ..." you will be prompted for logging in with both username and password.

Note that GitLab gives you username and an email but you must use your email as your username in order to clone a repository. (It took a few times through the Windows Credential Manager to figure that out.)

AgilePro
  • 5,588
  • 4
  • 33
  • 56
0

I have solved it myself. You have to delete the entry in Windows Credential Manager

Lorenz
  • 51
  • 5