无效:这是git存储库吗?

Far*_*hti 4 git clone github gerrit gitblit

我的问题不是这个问题。
在执行git clone我得到这个错误。我正在使用的命令是:

$ git clone "https://gdt.test.com/gitblit/log/?r=mytest.git&h=refs/heads/branch_development"
Run Code Online (Sandbox Code Playgroud)

在简单运行时:

$ git clone "https://gdt.test.com/gitblit/log/?r=mytest.git"
Run Code Online (Sandbox Code Playgroud)

我得到错误:

fatal: could not create work tree dir '?r=mytest'.: Invalid argument
Run Code Online (Sandbox Code Playgroud)

我想我需要将完整的URL以及r和h参数一起放入。因为这些参数指定了我的存储库的名称。

我做错了(复制和粘贴URL)。但是,即使使用URL:

gdt.test.com/gitblit/r/mytest.git/
Run Code Online (Sandbox Code Playgroud)

我收到错误消息:

'fatal: repository 'gdt.test.com/gitblit/r/mytest.git/'; not found. 
Run Code Online (Sandbox Code Playgroud)

如何从gitblit摘要页面复制正确的URL?

小智 6

问题:您正在复制和粘贴日志网页URL,并希望能够从生成的html中克隆存储库。

提出的成功答案已经充分清理了URL,从而使您看不到解决方案:您缺少URL中的存储库服务路径, /r/或者/git/

使用您的URL示例,正确的语法应为:

git clone https://gdt.test.com/gitblit/r/mytest.git

“摘要”页面为生成的URL提供复制和粘贴功能,可避免此类错误。

在此处输入图片说明


Far*_*hti 0

遇到问题了。我完全使用了错误的 git 存储库。正确的网址必须是:

git clone https://qualtar.demix@gdt.test.com/gerrit/mytest
Run Code Online (Sandbox Code Playgroud)