More importantly, you can check for yourself to debug use ssh -v to a server that uses public key authentication as follows: $ ssh -v OpenSSL 0.9.8e ĭebug1: Reading configuration data /d/.ssh/configĭebug1: identity file /d/.ssh/identity type -1ĭebug1: identity file /d/.ssh/id_rsa type 1ĭebug1: identity file /d/.ssh/id_dsa type -1ĭebug1: Next authentication method: publickeyĭebug1: Trying private key: /d/.ssh/identityĭebug1: Offering public key: /d/.ssh/id_rsa Hence why so many people suggest setting HOME if one of the others is not what you expect. My msysgit OpenSSL/Bash Git experience (not PuTTY's plink) is that the search order for your the. (Originally extracted from these two guides which I combined in one: How to setup Git for Windows and Configure MinGW-W64 MSYS to use PuTTY Plink/Pageant.) Try to clone with the Git SSH protocol from your host. Run a new instance of your MINGW64 Git console, and verify that the environment variables are there by writing the command env | grep -i ssh.For example, try to connect to via SSH, and a dialog will ask you if you accept the fingerprint of the server: click on YES. Open putty.exe and try to connect to the host where you host your Git repositories.Create these new user environment variables (via looking for application Environ through WindowsMenu which will find Edit environment variables for your account): GIT_SSH = "C:\puttyTools\plink.exe" and SVN_SSH = "C:\puttyTools\PuTTY\plink.exe".Locate your ppk file, enter your passphrase.Run pageant.exe, a new systray icon will appear.Give it a title that describes what machine the key is on (e.g. Copy the text in the top text box in PuTTYgen, the one labeled Public key for pasting into OpenSSH authorized_keys file and paste it into a new SSH key in GitHub's settings.It doesn't matter what you call the key, but for demonstration purposes, I'm going to call it github.ppk. The usual directory to save these in is %USERPROFILE%\.ssh (in my computer this maps to C:\Users\andres\.ssh\). Provide a passphrase, and repeat it in the subsequent textbox.Wiggle the mouse around in the top part of the window until the progress bar is full, as the program asks you to do.Download pageant.exe, puttygen.exe, putty.exe and plink.exe from PuTTY's website.All answers here were too short, so I'll post a detailed guide here: The most efficient way is using Pageant because it will let you write the passphrase only once at the beginning of the session instead of every push. On the GitHub website, go to 'Account settings', 'SSH and GPG keys', click 'New SSH key', and paste the key.In Git Bash, type 'cat ~/.ssh/id_rsa.pub', select the result, and copy it to the clipboard.If it lists the files in your home directory on the Git server, and then you're done!įor GitHub, you don't have shell access to their server, but you can upload the key using their website, so for the bit 'now copy to your server', do: That's it! You're done! From Git Bash, do the following to test: ssh ls Now ssh into the destination server, then do mkdir -p ~/.ssh Scp ~/.ssh/id_rsa.pub the bit on your own computer done.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |