There are many fine instructions about how to work with git under windows using GitBash.
I note that when git is installed, it offers the option of "set up for using git from the windows prompt", which puts git on the windows path.
Is there some way to set this up so that ssh authentication works?
At the moment I get "permission denied (publickey)" when I try to do git commands that access the remote.
(edit) I have set %HOME% to point to my Windows home directory, and there is a .ssh folder in there with id files that work under a gitbash shell.
I appreciate that the answer is likely "no, this is why GitBash exists". But - it would be good to know for sure.
If the answer is "no" it kinda makes you wonder why you would bother putting git on your windows path?
OpenSSH, the open source version of the Secure Socket Shell (SSH) tools, is a standard part of the Windows 10 and Windows Server 2019 operating systems. This greatly simplifies how to connect to GitHub with SSH on Windows.
It's in %HOMEDRIVE%%HOMEPATH%\. ssh . Note that GitHub for Windows normally uses SSL; SSH keys won't have been created unless you've used an SSH repository with it at some point. Save this answer.
ssh access works fine from a regular DOS session.
You only need to define C:\Users\YourAccount\.ssh
and add your id_rsa
and id_rsa.pub
there.
Launch your git session through git-cmd.bat
, which will define %HOME%
to your C:\Users\YourAccount
: that is what will make ssh work.
This should put your msysgit/bin installation in your PATH.
I really recommend not installing through a msi (Microsoft Installer), but through a simple unzip of an archive (portable version "PortableGit-x.y.z-preview201ymmdd.7z
")
And the OP GreenAsJade's comment points out the fact that GIT_SSH
must point to plink.exe
.
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