How to modify your git credentials when cloning from Git Extensions ?

Problem

I installed git extensions on Windows https://gitextensions.github.io/ in order to use git on Windows. I had to clone a repository located on a distant server.

clone_repo

But I used a wrong login (mywronglogin). Here is the error :

"C:\Program Files (x86)\Git\bin\git.exe" clone -v --recurse-submodules --progress --branch develop "https://www.example.com/git/myproject.git" "D:/my_repo_git"
Cloning into 'D:/my_repo_git/myproject'...
fatal: remote error: FATAL: R any myproject mywronglogin DENIED by fallthru
(or you mis-spelled the reponame)

Unfortunately from the user interface of git extensions it is not possible to modify the credentials !

I have done the following without success

  • Modifying login in git extensions UI
  • Looking for the configuration with my wronglogin in C:/Users/mylogin, the directory of git and git extensions
  • Modifying regedit
  • I tried to uninstall git exensions but after reinstall : i got the same issue !
  • Finally I found out about the credential helper for Windows which can cache git credentials.

Solution

I had to unset the cache credential in order to modify this login. Indeed the credentials are stored in the “credentials.helper” to avoid typing them every time. It is a nice feature except when you want you to modify the credentials for some reason.

I had to unset credentials like this :

git config --system --unset credential.helper

http://stackoverflow.com/questions/15381198/remove-credentials-from-git

Now when you will clone the repo you will be asked for the login/password !
If you were not aware of this feature you can spend quite some time on this problem.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s