Thursday, May 26, 2022

[SOLVED] hey am trying to learn git and i im getting error fatal: could not read from remote repo

Issue

I signed up on Github and then made private repo named lgit ("learn git") to at least try to test run command from the terminal but I am getting an error while trying to clone repo to my machine.

r3tr0@iCBM:~/test/gittest$ git clone [email protected]:username/lgit-rep.git
Cloning into 'lgit-rep'...
[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.

Solution

Because you're trying to clone your repo at local with SSH. You can check @Luck's answer for this.

Or with username and password, you can clone your repo with https, get the git https to clone like below.

enter image description here



Answered By - Thọ Đỗ Xuân
Answer Checked By - Mary Flores (WPSolving Volunteer)