3

I have reinstalled tortoisegit twice now on my desktop, and for some reason it will never prompt me when working with my Google Code repo. I have the changes commited, I just want to sync them out. I am coming from tortoisesvn and tortoisehg where this is definitely possible. I am trying to convert my repo to git, but running into issues with the program not prompting for any kind of password, and then failing to sync out because of permissions.

Matteius
  • 358
  • 1
  • 4
  • 9
  • 1
    I have finally answered my own question: http://stackoverflow.com/questions/6031214/git-how-to-use-netrc-file-on-windows-to-save-user-and-password Specifically: A common trap with with netrc support on Windows is that git will bypass using it if an origin https url specifies a user name. Still doesn't answer why tortoisegit doesn't ship with a password prompt ... – Matteius Jul 06 '12 at 03:42

4 Answers4

6

Change the following setting to allow tortoise git to ask the username and password always:

TortoiseGit > Settings > Git > Credentials > Credential helper > select None

enter image description here

sharkbait
  • 2,980
  • 16
  • 51
  • 89
3

Thanks for this, Matteius-- I had to reinstall Windows on my computer, and when I switched to the latest version of TortoiseGit, it suddenly wouldn't push to my Google Code repo; it would never ask me for my password.

So for those out there with this problem, by far the easiest solution to this (to make it start asking for a password again) is to edit the settings for your Git project, and change the URL to not have a username in it.

Ex: Right click project, choose TortoiseGit -> Settings. Click Edit local .git/congif (if that applies to you), on the Git section. Change URL from:

url = https://username@code.google.com/blah blah blah

to

url = https://code.google.com/blah blah blah

Save everything and you should be good to go. When you push now, it will ask you for a username and password.

Richard
  • 1,912
  • 20
  • 28
  • No Problem Richard, if you wouldn't mind voting up my question. I would vote up both answers if I were above 15 reputation, as such I need a boost. Glad we got to the bottom of this one! – Matteius Jun 28 '13 at 14:43
3

if you had set Credential, you can go to \Control Panel\User Accounts\Credential Manager click on windows credentials and edit the corresponding credentials to correct it.

SDJSK
  • 1,292
  • 17
  • 24
2

google code does not allow embedding password in URL

https://username:password@code.google.com/blah

If you wish to store password, use git credential helpers.

For TortoiseGit 1.8.1.2 or later, there is a GUI to switch on/off credential helper.

It supports git-credential-wincred and git-credential-winstore.

Make sure you install msysgit 1.8.1 or git-credential-winstore.

enter image description here

linquize
  • 19,828
  • 10
  • 59
  • 83