I just started to work on Git. I use windows 7 and has installed msysgit(1.7.8) and Tortoisegit(1.7.6). The repository is created on Linux server which is accessible thru LA
To automate authenticating either use:
Obviously, do not store your password in a text file unless the repo is not important.
TortoiseGit >1.8.1 installs the helper git-credential-winstore which provides the local API to access and store your login info in the existing, local Windows Credential Store.
You can see the stored credentials by going to Control Panel → User Accounts → Credential Manager and choosing "Windows Credentials". The entries starting "git:" are from git-credential-winstore.
You can set up wincred per repository by:
(GUI)
(CLI, POSH)
cmdkey /add:git:https://USERNAME@github.com /user:USERNAME /pass:PASSWORD
@"
[credential]
helper = wincred
"@ | Out-File -FilePath $repoRoot\.git\config -Append
You can list all credentials stored for repos with cmdkey /list:git:*
Once stored, passwords are not displayed by cmdkey (http://ss64.com/nt/cmdkey.html)
To list all credentials with passwords you need to use the Windows API. For powershell, there's CredMan:
. .\CredMan.ps1
.\CredMan.ps1 -ShoCred