5

Git: How can I cache password locally in windows machine. I have mysysgit and tortoisegit

Edit:
I use https

Cœur
  • 37,241
  • 25
  • 195
  • 267
Quintin Par
  • 15,862
  • 27
  • 93
  • 146
  • 1
    see this question: http://stackoverflow.com/q/370030/285619 – RDL Mar 24 '11 at 03:51
  • 1
    Are you authenticating with ssh or https? – Cascabel Mar 24 '11 at 05:34
  • @Will, This is about http git and not ssh auth. The linked Q is with ssh – Quintin Par Mar 25 '11 at 05:07
  • Sorry, its kind of unclear exactly how this applies to programming/software development tools. Can you edit your question to clarify? –  Mar 25 '11 at 12:38
  • @Will How is this unclear? I had the same question. I consider Git Version Control a development tool. I have used other so-called version control tools that were more of a hindrance. I call these Developer-Control tools. :-) – Mark Good Dec 15 '11 at 15:59
  • @MarkGood: It would have to be storage of a password for those git apps is different than for any other app on your machine. –  Dec 15 '11 at 16:19

3 Answers3

5

In a more recent answer, VonC points out that you can put your username and password for a particular host that you access over https in a file called _netrc in your home directory, and git will use them for the HTTP transport. For example, if you're trying to access the repository referred to by the URL https://you@github.com/you/project.git, you would put the following in _netrc:

machine github.com
  login you
  password yourpassword
Community
  • 1
  • 1
Mark Longair
  • 446,582
  • 72
  • 411
  • 327
2

You can install git-credential-winstore to save git passwords in Windows credentials manager

KindDragon
  • 6,558
  • 4
  • 47
  • 75
  • git-credential-winstore requires .NET 4 – linquize Nov 15 '12 at 04:18
  • If you've installed git within Cygwin, it does not recognize normal Windows paths. Install GitCredentialWinstore using normal cmd.exe: git-credentials-winstore.exe -i C:\Cygwin\bin\git.exe and then in Cygwin: $ git config --replace-all --global credential.helper /cygdrive/c/Users/..youruserid../AppData/Roaming/GitCredStore/git-credential-winstore.exe – akauppi Aug 04 '14 at 05:33
1

Since msysgit 1.8.0, there is also a built-in credential helper program git-credential-wincred, which does not require .NET framework.

However, it is missing from current installation package.

linquize
  • 19,828
  • 10
  • 59
  • 83