问题
I know this question has been asked before and I've been looking at this link :
https://www.kernel.org/pub/software/scm/git/docs/git-credential-store.html
I'm really really new to using Git Gui Application for Windows and Git Hub in general.
I've "fetched" an existing repository by typing in the URL for the repository from the Git Hub website in the format https://github.com/projectname.git
To push to it, I copy paste files into my local git directory and then hit f5 in Git Gui and commit/push to the origin.
However each time I want to push something - it asks me for my username and password. The guide says to create a text file named .git-credentials with your username and password in the given format:
https://user:pass@example.com
Question:
How do I link the usage of the .git-credentials file with my Git Gui Application?...Am I using DOS? Or some Git Shell from somewhere?...
Any help would be greatly appreciated...
回答1:
One solution is to use the GitHub for Windows application: it will store your credentials for you, as mentioned in this GitHub help page.
But it also adds:
If you don't want to use GitHub for Windows, you can download the helper for your OS here:
Windows Vista, 7, & 8 (.NET 4.0 required)
Unzip the file and run the
git-credential-winstore.exe
program inside. This will start up the helper and update your git config to use it.Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication.
So you don't need to create yourself a .git-credentials
file: the git-credential-winstore.exe
program will guide you through it.
来源:https://stackoverflow.com/questions/16901404/using-git-gui-windows-how-do-you-save-user-credentials-username-and-password