Score:0

How can I use one ssh key from my local machine to my server and to git hub?

in flag

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.

ar flag
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.
Abayomi Usman avatar
in flag
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
ar flag
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.
Abayomi Usman avatar
in flag
oh! yes let me try that
Abayomi Usman avatar
in flag
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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.