Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
没有命名空间的Gitlab克隆URL?_Url_Ssh_Gitlab_Clone_Gitolite - Fatal编程技术网

没有命名空间的Gitlab克隆URL?

没有命名空间的Gitlab克隆URL?,url,ssh,gitlab,clone,gitolite,Url,Ssh,Gitlab,Clone,Gitolite,从gitolite迁移到gitlab时,我们发现gitlab不支持克隆以下表单的URL: gitlab.example.com:<my-repository>.git gitlab.example.com:.git 相反,它需要一个名称空间(组、用户名或子组),如下所示: gitlab.example.com:<namespace>/<my-repository>.git gitlab.example.com:/.git 不幸的是,这将破坏多个构建脚本

从gitolite迁移到gitlab时,我们发现gitlab不支持克隆以下表单的URL:

gitlab.example.com:<my-repository>.git
gitlab.example.com:.git
相反,它需要一个名称空间(组、用户名或子组),如下所示:

gitlab.example.com:<namespace>/<my-repository>.git
gitlab.example.com:/.git
不幸的是,这将破坏多个构建脚本。 有没有可能用另一种方法

我已经尝试创建一个名称空间为空的组,但这是禁止的

我们预期的行为是克隆URL中没有名称空间,例如

git clone gitlab.example.com:<my-project>.git
git克隆gitlab.example.com:.git
考虑到回购协议的性质,您需要将回购协议分为一个专门的组,例如“
全球”

仅此一点并不能解决您的团队问题:
globalGitLab:myrepo.git
不起作用

但是,您也可以设置全局Git配置:

git config --global url."globalGitLab:global/".insteadOf globalGitLab:
(见“”)


这将把任何
globalGitLab:myrepo
(来自您的脚本)转换为
globalGitLab:global/myrepo
,这与GitLab所期望的兼容

谢谢你的回答!我正在考虑使用ssh配置,但没有考虑git配置。@user1370297是的,两种设置的组合在这里可能会有所帮助。
Host globalGitLab 
     HostName gitlab.example.com
     User git
     IdentityFile /path/to/right/id_rsa
git config --global url."globalGitLab:global/".insteadOf globalGitLab: