1

I run magit on Linux and it works very well. On Windows, it works almost the same except the push process:

Git Bash would ask me to enter passphrase to continue, while magit just hangs.

I set ssh-agent to remember passphrase on git bash. But it has no effect on magit.

Is there a way to let magit remember passphrase?

Edit

I use SSH, not HTTPS. So the github credential helper won't work.

9
  • I don't know if this is possible from Magit (although I don't see how it could store the password securely and not bug you for an access-password all the time), but you can use a 'credential helper' on Windows: help.github.com/articles/caching-your-github-password-in-git/… Jan 1, 2015 at 15:40
  • I am a tired of this question. It has been asked and answered so many times. Have a look at the FAQ or search SE. It would also be nice if one of the many Windows users having problems with this would not only kinda solve the issue for himself, but invest some time to investigate the issue further and then share his improved solution.
    – tarsius
    Jan 1, 2015 at 22:08
  • @SeanAllred Thank you for your help. I use SSH. The credential helperis useful for HTTPS (user name / passward). I think I need to figure out magit and ssh-agent cooperations. (ssh-agent works well for git-bash.)
    – Nick
    Jan 2, 2015 at 0:22
  • Then I'm frankly not sure why you need a password… though it's been a while since I used Windows regularly for development work. Jan 2, 2015 at 0:23
  • @SeanAllred Not a password, it's the passphrase setted at the stage of generating ssh rsa key. I guess many people left this passphrase blank.
    – Nick
    Jan 2, 2015 at 0:25

1 Answer 1

0

Problem solved by:

  1. Remove Git-Bash.
  2. Install 'GitHub'. GitHub will add two shortcuts on desktop:

    -GitHub: for GUI.

    -Git Shell: An integretated PowerShell with git and other commands.

  3. Check 'Git Shell' destination. On my system, it is:

    C:\Users\Nick\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin
    
  4. Add this dir to $Path. Voila, Magit in Emacs could push without any problem.

Other resources

  1. Generating SSH
  2. Working with SSH key passphrases
1
  • Can you please accept your answer so this question can be marked as answered?
    – verdammelt
    Feb 20, 2015 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.