So I've installed msysgit, and run git successfuly from the bash shell.
From within the bash shell, I've created keys with ssh-keygen
- everything works fine.
Key files are in my %userprofile%\.ssh
folder (from the bash shell, it is: ~/.ssh
).
I'm able to connect to my server (unfuddle in my case).
Next, I do want to be able to run git from the Windows Cmd shell.
Adding c:\msysgit\bin
and c:\msysgit\mingw\bin
to the search path.
Git is working locally just fine: branch, merge, add, commit, checkout, ... working well.
However, trying to work with the server fails, with: 'Permission denied (publickey).
'
It looks like git, when executed from command line looks at a different location trying to allocated the key files, or another reason causing it to fail.
The public part of the key is saved in the id_rsa. pub file, while the private part is saved in the id_rsa file. Both files can be accessed from this location using Explorer: C:\Users\[your user name]\. ssh .
Keys on your computer SSH keys are stored in the ~/. ssh folder.
The default location is: %HOMEDRIVE%%HOMEPATH%\. ssh\id_rsa. pub . That would expand to something like C:\Users\dennis\.
The same applies for git bash : the keys will be in ~/. ssh .
To get the mysysgit command line to find the .ssh keys you'll need to have %HOME%
point to the directory containing the .ssh folder
Often you can just do
set HOME=%USERPROFILE%
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