I'm trying to clone my gitlab repository.
Here i provided project-name as repo name and username as my user name.
Command I tried:
$git clone <copied gitlab repo of https>
Run Code Online (Sandbox Code Playgroud)
When i try to do that i got the below error.
Cloning into 'project-name'... remote: The project you were looking for could not be found. fatal: repository 'https://gitlab.com/username/project-name.git/' not found
help me someone how to get rid of it.
如果有人出于某种原因现在发现了这一点,那么最终对我有帮助的是在 gitlab 实例 url 前添加我的用户名。
git clone https://username@gitlab.com/username/project-name.git
Run Code Online (Sandbox Code Playgroud)
显然这是gitlab中的一个错误。
我通过简单地将用户名添加到网址中解决了这个问题,如下所示,
之前: https: //gitlab.com/gitlab_user/myrepo.git
之后:https://gitlabusername@gitlab.com/gitlab_user/myrepo.git
网址末尾有尾部斜杠 (/)。
git clone https://gitlab.com/username/project-name.git代替使用。