简体   繁体   中英

how to make windows remember my passphrase key?

I'm new to using git. Each time I want to push my file to github, it's always show me notification to enter my passphrase. Ex: Enter passphrase for key '/c/Users/.ssh/id_rsa':

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 http://help.github.com/ssh-key-passphrases/ . It seems only available for Mac / Linux.

Thanks for helping.

I believe if you use msysgit then you can install (or maybe it comes already installed) openssh.

With openssh you can use the command line program ssh-add to add you key once and remember it:

ssh-add /c/Users/.ssh/id_rsa

After spending ample time on going through many articles and stackoverflow answers I found following approach working out for me for Windows.

  1. Enable the OpenSSH Authentication Agent service and make it start automatically. Refer this article
  2. Add your SSH key to the agent with ssh-add
  3. Add an environment variable for GIT_SSH - setx GIT_SSH C:\Windows\System32\OpenSSH\ssh.exe
  4. Config git - git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe

4th step was the gem for me;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM