Unable to clone gitlab repository?

Jac*_*ccs 3 gitlab

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.

Dav*_*vid 6

如果有人出于某种原因现在发现了这一点,那么最终对我有帮助的是在 gitlab 实例 url 前添加我的用户名。

git clone https://username@gitlab.com/username/project-name.git
Run Code Online (Sandbox Code Playgroud)

显然这是gitlab中的一个错误。


Abd*_*han 5

我通过简单地将用户名添加到网址中解决了这个问题,如下所示,

之前: https: //gitlab.com/gitlab_user/myrepo.git

之后:https://gitlabusername@gitlab.com/gitlab_user/myrepo.git


And*_*oll 0

网址末尾有尾部斜杠 (/)。

git clone https://gitlab.com/username/project-name.git代替使用。

  • 这个答案根本没有用。事实上,是“git”本身在错误消息中的 URL 末尾添加了尾部斜杠。请参阅此处```&gt; git clone https://gitlab.com/xxx.git 克隆到'xxx'...远程:找不到您要查找的项目。致命:找不到存储库“https://gitlab.com/xxx.git/”``` (3认同)