GitHub: ssh -T git @ & # 8594; Permission denied (publickey). [Windows 7]

I have a problem and found nothing on stackoverflow or google. When I run ssh -T git @, I get a Permission denied (publickey) error.

Help in the Git reference manual doesn't help. Can anyone help me?

OK, I got a solution, maybe someone needs it, so we go:

Ok I got it finally.

First of all I say that I am running Windows 7 in German 64-bit! I don't know if it matters.

Well, this guide: says the files created in C: / Users / [PC-Name] /. Ssh /

So, this folder should have id_rsa and files. When I looked at them, I couldn't even find the folder. So where are the required files located?

I run a 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 have never entered this path. So now just copy the files and create a .ssh folder in C: / Users / [PC-Name] / go to the .ssh directory and paste the two files id_rsa and

Then don't run ssh -T git @ but:

ssh -T -i <path-to-id_rsa>


and rly make sure you use C: /.../.../ and NOT C: \ ... \ ... \ ..

This solved my problem. You may have the same problem.


source to share

2 answers

Another SO post contains a solution:

Permission denied (publicickey) while deploying heroku code. fatal: the remote end hung up unexpectedly

Try to copy id_rsa


to Git installation directory. Something like this: C:\users\user\.ssh

toC:\Program Files (x86)\Git\.ssh



I couldn't even find the folder

This folder can be any folder you want as long as you define a user environment variable HOME

(which is not defined by default for Windows Xp or Seven)

If you specify HOME

- C:\path\to\folder

then id_rsa


you need to save:





All Articles