I'm new to using git. Each time I want to push my file to github, it always shows me notification to enter my passphrase. Ex: password for 'https://[email protected]'
I want my git remember the passphrase for me. How should I possibly do that on windows 7? I've already read the help page here https://help.github.com/articles/set-up-git
To save username and password in Git, open your “GitHub” remote repository and copy its “URL”. Then, launch “Git Bash”, paste the “URL” with the “$ git clone” command, specify the credential and execute it. Lastly, run the “$ git config –global credential. helper store” command to save the credential in the “.
The default path for the git credential store is $HOME/. git-credentials (or $XDG_CONFIG_HOME/git/credentials, if the previous location doesn't exist).
You can use git-credential-store to store your passwords unencrypted on the disk, protected only by the permissions of the file system. You can check the credentials stored in the file ~/.git-credentials . For more information, visit git-credential-store - Helper to store credentials on disk. Save this answer.
The default is ~/. git-credentials .
If you're following the instructions on Github, note this line.
Good to know: The credential helper only works when you clone an HTTPS repo URL. If you use the SSH repo URL instead, SSH keys are used for authentication.
You're using ssh, so the git credential helper isn't going to work. You have a few options.
The ssh issue isn't specific to git. You can set up an ssh-agent so you only have to enter an ssh key password once. It will be remembered, safely stored in memory, until you log out. Github has a tutorial about setting up an ssh-agent.
No matter which option you pick, I would highly recommend you take the time to set up an ssh-agent. Ssh is so useful and so widespread you're going to run into this problem again.
Instead of cloning from [email protected]:username/my-repo.git
you can clone from https://github.com/username/my-repo.git
. It's the http
button on your project page. Then the git credential helper described in the github docs will work. You'll probably have to install it first, or use their Github app. This is all described in the Password Caching section of the Github on Windows setup guide.
The guide mentions they have a Github app now and it can probably take care of this for you. However this is only a stop gap as other git servers won't have such a thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With