4

This has been torturing me for a long time since I first began to use TortoiseGit 1.8.5.

The credential helper is there, but it never works!

I googled a lot, but none of the methods worked, eg, TortoiseGit save user authentication / credentials

Yesterday I downloaded and installed the latest 1.8.10 hoping the bug should be fixed. But still nothing.

Can anyone write a step-by-step configuration tutorial on how to enable this helper tool? Great thanks!

BTW, there is a partially working method. I have to use Advanced mode in the "Credential helper" dropdown list; and then add a new entry for my github repo URL. But that can only remember username.

Community
  • 1
  • 1
nim
  • 384
  • 2
  • 14
  • Which Git for Windows version and Windows version are you using? – MrTux Aug 18 '14 at 11:32
  • 1.9.4. I am having the same problem on Windows XP, Windows 7, Windows Server 2008 R2, all in VitualBox VM.. – nim Aug 19 '14 at 03:36
  • possible duplicate of [TortoiseGit save user authentication / credentials](http://stackoverflow.com/questions/14000173/tortoisegit-save-user-authentication-credentials) – MrTux Sep 30 '14 at 16:57

4 Answers4

4

If you install Git Extensions (or most modern Git GUI tools) it'll add these lines to C:/Users/{yourusername}/.gitconfig

[credential]
    helper = !\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"

This says "store the git credentials in the Windows credentials vault." If you don't have that line, either reinstall the affected program or choose a different Git GUI tool. (All else being equal, TortoiseGit is pretty awful. See https://stackoverflow.com/a/10957742/702931)

Ok, so you've now got a credential helper. How to edit the credentials stored? Go to Control Panel -> User Accounts -> your account (you're probably already there) -> Manage your credentials -> Windows Vault (you may already be there) -> scroll down to the git:https://github.com line and click the down arrow. You can choose to edit or delete the credentials here.

Community
  • 1
  • 1
robrich
  • 13,017
  • 7
  • 36
  • 63
  • I have "helper = wincred" in my .gitconfig. And git-credential-winstore.exe, git-credential-wincred.exe in %gitdir%\libexec\core. – nim Aug 19 '14 at 04:15
  • Replace wincred with full/path/to/git-credenial-winstore, or look to http://stackoverflow.com/a/15382950/702931 to mess with wincred. – robrich Aug 19 '14 at 16:49
  • Awesome! Congratulations. – robrich Aug 21 '14 at 06:13
  • I fail to see how that link has anything to do with Tortoise Git being pretty awful. Thus far, Tortoise Git is one of the few tools that has worked reliably for me. GitHub Desktop failed for me almost immediately after installing it and started giving cryptic errors for some basic functionality. It was embarrassing. GitExtensions seems okay but the password issue is the same for it as for Tortoise Git. Either way it is terribly painful to get keys setup regardless of which tool is used. – shawn1874 Oct 14 '16 at 16:55
  • @shawn1874: generally all the tools install and use the same credential helper. – robrich Oct 15 '16 at 21:54
  • Could you please explain what the !\ before the full path means? Thanks. – Betty Mar 22 '21 at 06:27
  • `!` means "run this as a shell command" rather than as a git command. \ escapes the quotes so it's not interpreted as an argument but rather the entire command goes to the shell. Without this, it would try to run `C:/Program` and fail. :D – robrich Mar 23 '21 at 16:09
4

wincred has a bug when there is an @ in your username. See this issue in msysgit.

So, if you are using Bitbucket for instance, you might be signing in with an email address, but if you edit your account you'll see that you also have a non-email username. Use that and it should work.

Wayne Bloss
  • 5,370
  • 7
  • 50
  • 81
2

If you are still interested, "wincred" method works normally only with "normal" username, not with e-mail which can be used as a username sometimes (e.g. in GitHub). Just spend almost a hour to get wincred to work for me on Github where I almost always before was logged via e-mail as a username. After login with Github username (not e-mail) it start work as expected.

Hope this could help you of someone else.

Alexey Kryshen
  • 1,067
  • 2
  • 11
  • 15
0

All we do is set the credential helper to wincred - current Windows user

Then when we do a push we get asked for the username and password and it stores them. There is nothing else we do to get this to work.

Bob Bader
  • 31
  • 2
  • 1
    The problem is I was asked for username/password every time I do a push. This happens on Windows XP, Windows 7 and Windows 2008. What have I done wrong? – nim Aug 19 '14 at 03:09