簡體   English   中英

在 gitlab 運行器中克隆 git 存儲庫

[英]clone git repository in gitlab runner

我需要有關 gitlab 跑步者的幫助。 我需要克隆另一個啟動運行器的 gitlab 存儲庫。

例如: CI runner runner-repo-arepo -a 中執行,我需要在runner-repo- a 中克隆repo-b

我現在有:

GO_CHEF: git.developers.mycompany.com/chef/myrepo-chef-repo.git
[...]
Update databags:
  stage: update
  script:
    - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@git.developers.mycompany.com:".insteadOf "https://git.developers.mycompany.com"
    - go get -u ${GO_CHEF}

這是錯誤:

package git.developers.mycompany.com/chef/myrepo-chef-repo.git: cannot download,         
git://git.developers.mycompany.com/chef/myrepo-chef-repo uses insecure protocol

問候,

此錯誤可能是由於您的環境中使用了https協議。 一種更簡單的方法是只使用SSH版本的git clone

您需要在從中克隆的機器中生成 SSH 密鑰並將該密鑰添加到 GitLab 中。 請參考生成 SSH 密鑰,一旦完成,參考 了解如何將rsaxxxx.pub添加到 GitLab 中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM