0

Is it possible to use the same ssh key created on my local machine that I used to connect with my server, on my server to use it to connect to my github repository, if it is can I know how please because I had browse the internet and askubuntu similar questions and answer none seems to answer my question and solve my problem and when I created a different ssh key on my server and added it to my git repo and tried to clone my repo on my local machine I was getting the error

Cloning into 'Black-Anthem-Ltd-Website'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

so please how can I go about cloning my git repo successfully using the ssh key I created on my local machine or how can i give my local machine permission to have access to the ssh public key, the key on the server and the key on my local machine both have the same file name. I'm using ubuntu on Windows Subsystem Linux.

5
  • This does not sound like an Ubuntu problem. If you think this problem is caused by Ubuntu, please add the version number of Ubuntu in your question.
    – user68186
    Aug 15, 2021 at 13:51
  • Is it possible to use the same ssh key created on my local machine that I used to connect with my server, on my server to use it to connect to my github repository Aug 15, 2021 at 13:53
  • One ssh key has two parts, a private key part and a public key part. The private part lives in your local machine. The public part lives in your server so that you can ssh from your local machine to the server. Putting both parts in the server may be a security risk. I have no idea why you can't put two ssh public keys in the GitHub repository.
    – user68186
    Aug 15, 2021 at 14:03
  • oh! yes let me try that Aug 15, 2021 at 14:06
  • Thank you so very much it is done, i have been able to clone my git repository successfully after adding the public key that is on my local machine to my github profile thank you so very much @user68186 GOD BLESS YOU Aug 15, 2021 at 14:11

0

You must log in to answer this question.

Browse other questions tagged .