2011-03-24 55 views
5

可能重複:
git can't remember my passphrase緩存HTTP混帳密碼:mysysgit

混帳:我怎樣才能在Windows機器緩存在本地密碼。我有mysysgit和tortisegit

編輯:
我使用https

+1

看到這個問題:http://stackoverflow.com/q/370030/285619 – RDL 2011-03-24 03:51:43

+1

你用ssh或https進行身份驗證嗎? – Cascabel 2011-03-24 05:34:44

+0

@會,這是關於http git而不是ssh auth。鏈接的Q與ssh – 2011-03-25 05:07:05

回答

5

a more recent answerVonC指出,你可以把你的用戶名和密碼,您訪問過https在一個名爲_netrc文件中的特定主機在你的主目錄下,git將把它們用於HTTP傳輸。例如,如果你想訪問URL https://[email protected]/you/project.git提到的庫中,你會把下面的_netrc

machine github.com 
    login you 
    password yourpassword 
+0

它是否適用於http協議? – 2012-02-03 01:57:17

+0

@愛國者:是的,應該這樣做。 – 2012-02-03 10:02:30

+0

似乎應該是「登錄」而不是「用戶名」在第二行 – 2012-04-12 00:25:48

2

您可以安裝git-credential-winstore保存密碼的Git在Windows憑據管理器

+0

git-credential-winstore需要.NET 4 – linquize 2012-11-15 04:18:15

+0

如果你已經在Cygwin中安裝了git,它不能識別正常的Windows路徑。使用普通的cmd.exe安裝GitCredentialWinstore:git-credentials-winstore.exe -i C:\ Cygwin \ bin \ git.exe然後在Cygwin中:$ git config --replace-all --global credential.helper/cygdrive/c /Users/..youruserid../AppData/Roaming/GitCredStore/git-credential-winstore.exe – akauppi 2014-08-04 05:33:55

1

由於msysgit 1.8.0,還有一個內置的憑證幫助程序git-credential-wincred,它不需要.NET框架。

但是,它從當前安裝包中丟失。