Bassie
Bassie

Reputation: 10380

Unable to Clone Existing Gitlab Repo

I have a project on gitlab which I am trying to clone locally (Windows 7) using

git clone [email protected]:USERNAME/projectname.git

But I see this error:

Cloning into 'foldername'...

GitLab: The project you were looking for could not be found.

fatal: Could not read from remote repository.

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

I know that the repo definitely exists as I can see it under my GitLab account.


I also tried the solution posted here, but I get this error:

fatal: unable to access 'https://[email protected]/USERNAME/projectname.git/`: SSL certificate problem: unable to get the local issuer certificate

I'm pretty sure I have had this working in the past using SSH rather than HTTPS, so not sure if this is the right route to go down.


I have added a SSH key to the project and my local machine, and have no idea where to go from here - appreciate any help or guidance!

Upvotes: 1

Views: 2219

Answers (1)

Bassie
Bassie

Reputation: 10380

This was not working because %USERPROFILE% was set to some other directory which was not C:\users\user.name\.

I was grabbing the ssh key from C:\users\user.name\, but this key was actually related to another project and server altogether.

When executing ssh-keygen, I was passing in %USERPROFILE% as the path, not knowing that the value had changed.

Upvotes: 1

Related Questions