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.

1. Create a file called _netrc with the following contents:

login <login>
password <password>

2. Copy the file to C:\Users\<your-username> (or another location; this just happens to be where I’ve put it)

3. Go to command prompt, type setx home C:\Users\<your-username>

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.

11 thoughts on “Saving username and password with TortoiseGit

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>