Tortoisegit asking password
If you need to use a username/password, there is a much simpler solution than the current #2 answer:
Right-click --> Tortoise Git --> Settings --> Git --> Credential --> Choose "Wincred, all Windows users" --> Hit apply
The next time you enter the password for a repo, that password will be automatically saved.
If you're using a repository that requires SSH keys rather than username/password (which it sounds like was OP's original issue), you need to
- Open the SSH key in PuTTY gen (installs itself alongside Tortoise Git)
- In PuTTY gen, save the key as a PuTTY key.
- In the repository,
Right-click --> Tortoise Git --> Settings --> Git --> Remotes
. Find your remote (usually 'origin') then load the PuTTY key from step 2.
My colleague solved the problem. Steps:
- Right click -> TortoiseGit -> Settings -> Network
- SSH client was pointing to
C:\Program Files\TortoiseGit\bin\TortoisePlink.exe
- Changed path to
C:\Program Files (x86)\Git\bin\ssh.exe
Alternative Path: C:\Users\...\AppData\Local\Programs\Git\usr\bin\ssh.exe
Saving username and password with TortoiseGit
Saving your login details in TortoiseGit is pretty easy. Saves having to type in your username and password every time you do a pull or push.
Create a file called _netrc with the following contents:
machine github.com
login yourlogin
password yourpasswordCopy the file to C:\Users\ (or another location; this just happens to be where I’ve put it)
Go to command prompt, type setx home C:\Users\
Note: if you’re using something earlier than Windows 7, the setx command may not work for you. Use set instead and add the home environment variable to Windows using via the Advanced Settings under My Computer.
CREDIT TO: http://www.munsplace.com/blog/2012/07/27/saving-username-and-password-with-tortoisegit/
To do it without keys...
Right click on your folder
Select tortoiseGit->settings->Git->Remote
Select origin (or whatever you have labeled your main remote)
Under URL use this format.
Https://USERNAME:PASSWORD@URL
Where
USERNAME is your username
: the colon separates username and password and must be there
PASSWORD is your password
@ separates credentials with your url
URL is the url you would use to connect to the .git resource
Thanks goes to Kamaci