首页 文章

更新8.0后,Gitlab multi-runner无法获取git存储库

提问于
浏览
2

我已将Gitlab更新为8.0版本 . 还将CI集成到Gitlab中 . 但是现在当CI跑者尝试获取git存储库时,它会获得空存储库 . 已弃用的跑步者(我以前使用过的)和新的 gitlab-ci-multi-runner 出现错误

我有错误

gitlab-ci-multi-runner 0.5.5-1-g69bc934 (69bc934)
Using Shell executor...
Running on my_server...

Fetching changes...
Checking out 9f6188d0 as super_branch...
fatal: reference is not a tree: 9f6188d0e197e0a010257d3a961c95b5a4abe504

ERROR: Build failed with: exit status 128

两个版本的错误都相同 .

我检查了什么是git远程路径 . 当我尝试将其克隆到我的PC时,我收到警告,该存储库为空,它只创建了 .git 目录 .

1 回答

  • 3

    //UPDATE

    得到它修复^^

    失败是由nginx / apache和新的'gitlab-git-http-server'引起的 . 以下是我在增量更新中找到的链接:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/7.14-to-8.0.md#new-nginx-configuration

    如上所述,

    如果跳过此步骤'git clone'和HTTP(S)上的'git push'将停止工作 .

    基本上你的跑步者正在与独角兽交谈,而它应该从'gitlab-git-http-server'请求回购 .


    例如,我正在使用apache 2.4并且必须更改站点中的gitlab文件 - 可用:

    从:

    RewriteEngine on
      #forward all requests to GitLab Rails app (Unicorn) 
      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
      RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
    

    至:

    RewriteEngine on
      #forward request ending with .git to gitlab-git-http-server
      RewriteCond %{REQUEST_URI} .*\.(git)
      RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
    
      #forward any other requests to GitLab Rails app (Unicorn) 
      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
      RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
    

    请记住正确地重新加载您的网络服务器,以便利用您的更改 .


    //OLD

    因为我遇到了同样的问题:使用'gitlab-runner'用户(在其特定的build-dir中)克隆repo并最终从ci开始导致(可能)成功构建 .

    但这只不过是一种解决方法 . 只要清理构建目录或切换分支,它就会再次崩溃

相关问题