Answer the question
In order to leave comments, you need to log in
Why does git clone throw a Permission denied (publickey) error?
Good day to all.
The problem is the following. When trying to clone a remote repository, a Permission denied (publickey) error is thrown.
I generated the keys on ubuntu, and now I need to work from Windows. I copied these same keys and placed them in the .ssh folder available on Windows. Namely, in id_rsa and id_rsa.pub. But the error is still thrown.
I wanted to generate new keys, but I was told to use the existing ones.
Answer the question
In order to leave comments, you need to log in
If suddenly someone encounters a similar problem, then I solved it as follows
in the .ssh folder, created a config file (without extension) and added the following there:
host (specify host)
hostname (specify hostname)
port (specify the required port)
user (specify user )
identityfile ~/.ssh/id_rsa
On unix-like systems, you would need to ssh-add to add the private key.
Windows has its own instructions .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question