Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 5784  / 2 Years ago, wed, june 29, 2022, 9:36:05

I am attempting to clone a git repo from inside an ubuntu 20 server, but after it permanently adds my ECSDA key, I get the following error:


[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

I do have access to it from my local machine, but how do I access that Github repo from this Ubuntu server?


I tried to clone it by running, sudo git clone [email protected]:MyRepo/api-service.git


To to be clear this repository is up on Github and I am inside an ubuntu 20 server trying to clone it.


Is this not a matter of adding the keys from Github?


More From » server

 Answers
5

Step 1. - From within your Ubuntu server run ssh-keygen -t rsa


Step 2. - From within your Ubuntu server run cat ~/.ssh/id_rsa.pub


Step 3. - Copy and paste the resulting key and paste it into Github account, by going to Settings, then *SSH and GPG section and click the New SSH key button.


Step 4. - Go back to your Ubuntu server and run git clone [email protected]:MyGithubRepo/service-api.git


[#789] Wednesday, June 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
reangi

Total Points: 213
Total Questions: 102
Total Answers: 114

Location: Namibia
Member since Wed, Jan 19, 2022
2 Years ago
reangi questions
;