Emacs With GitHub/Bitbucket And SSH On Windows
It's nice to be able to seamlessly use Emacs with GitHub/Bitbucket from the command line. I had a little trouble getting it to work initially. Using the below references, here are the steps I came up with.
Use puttygen to generate the key.
- Save both the public and private key to somewhere safe on your hard drive.
- Save a new version of the public key, removing everything except the key text string.
- In the new public key file, prefix they key with
ssh-rsafollowed by one space and a carriage return.
- Don't use emacs to copy the key from the file, paste it into the area provided in the github/bitbucket settings
- Add private key to Pageant
GIT_SSHto use plink
- Mine is here:
- Mine is here:
- The first time pushing, push using
git push origin yourbranchto have putty store the server's fingerprint.
- Restart emacs
EDIT: You can in store passwords using wincred helper in latest git and have git present user with a minimal popup dialog when required. This means you can make https remotes just as convenient as ssh remotes on windows.
Steps To Add A Project
- Create repository on GitHub.
- Start Pageant.
- Add your private key to pageant.
- Copy the SSH link provided by GitHub and add it as a remote, e.g.:
git remote add origin ssh://email@example.com:yourUser/yourRepo.git
- Use the putty GUI to connect to the ssh server first in order to accept the remote's fingerprint.
- See this link for more information: http://stackoverflow.com/questions/33240137/git-clone-pull-continually-freezing-at-store-key-in-cache
git push origin master