How to fix 'The project you were looking for could not be found' when using git clone

I am trying to clone a project from gitlab to my local machine. I have been granted rights as a developer, and use the command 'git clone

  • None of the protocols work (ssh and https neither work)

The error message I am getting:

remote: The project you were looking for could not be found.
fatal: repository 'https://gitlab.com/KZA_Connected/skilltree.git/' not found

Any help would be highly appreciated.


Solution 1:

I solved this by simply adding username to url like below,

before: https://gitlab.com/gitlab_user/myrepo.git

after: https://[email protected]/gitlab_user/myrepo.git

Solution 2:

Today, I was having the same issue. The repo was working fine at my home machine, but when I tried the same repo in other machine I started facing the same error. I was using below URL

https://gitlab.com/{gitlab_user}/project_repo.git

And now I changed above URL to below

https://{gitlab_user}@gitlab.com/gitlab_user/project_repo.git

And it worked for me. Above solution was found at below URL

https://medium.com/@imstudio/gitlab-the-project-you-were-looking-for-could-not-be-found-issue-685944aa5485

Hope this helps other.

Solution 3:

On mac osx, it usually means that your ssh credentials are not loaded. Brute force solution:

cd ~/.ssh
ssh-add *

I have to do this every time my Macbook reboots.