Reputation: 61
I have a problem and didn't find anything on stackoverflow or google. When i run ssh -T [email protected] I get the error Permission denied (publickey).
The helps in the Git Help guide doesn't help. Can someone help me?
OK i got the solution, maybe someone needs it so here we go:
Ok, i got it finally.
First of all it is to say I am running here the Windows 7 OS in German 64bit! I don't know if this is important.
Well, in this guide: http://help.github.com/win-set-up-git/ they say, that the files where create in C:/Users/[PC-Name]/.ssh/
So in this folder there shall be the files id_rsa and id_rsa.pub. When i looked them up, i wasn't able to find even the folder. So where are the necessary files?
I run the search and i find them in: C:\Users[yourpcname]\AppData\Local\VirtualStore\Windows\SysWOW64
I don't know why or how they get there. I never typed in this path. Ok, so now just copy the files and create the .ssh folder in C:/Users/[PC-Name]/ move to the directory .ssh and paste the two files id_rsa and id_rsa.pub.
Then don't run ssh -T [email protected] but:
ssh -T [email protected] -i <path-to-id_rsa>
and rly take care that you use C:/.../.../ and NOT C:\...\...\..
This solved my problem. Maybe you have the same problem.
Upvotes: 4
Views: 2694
Reputation: 311
Another SO post contains the solution:
Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly
Try to copy id_rsa
and id_rsa.pub
into the Git Installation folder.
Something like this: C:\users\user\.ssh
to C:\Program Files (x86)\Git\.ssh
Upvotes: 3
Reputation: 1323115
I wasn't able to find even the folder
That folder can be any folder you want, as long as you define an HOME
user environment variable (which isn't defined by default on Windows Xp or Seven)
If you define HOME
to C:\path\to\folder
, then id_rsa
and id_rsa.pub
need to be stored in:
C:\path\to\folder\.ssh
Upvotes: 1