Gitlab runner 无法访问子模块
Gitlab runner has not acces to submodule
我创建了一个带有子模块的新项目,并且想要 运行 一个 gitlab-ci.yml。
但是每次 运行ner 告诉我他没有访问权限或找不到该项目。
运行ner 是 windows10 系统上的共享 运行ner(必需)。它适用于旧项目,但不适用于新项目。
你知道我做错了什么吗?
我已经做了:
- 在另一个 运行ner
上测试
- 为 运行ner
使用 fetch 和 clone
- 运行 手动 git 克隆 --recursive git@gitlab.... 在 运行ner VM
- 在我当前的电脑上递归克隆 repo,它成功了!
- first answer
CI-脚本:
stages:
- build
variables:
ARTIFACTS_OUTPUT_PATH: "./builds"
GIT_SUBMODULE_STRATEGY: recursive
test_123:
stage: build
only:
- tags
- triggers
- schedules
- web
script:
- some commands
artifacts:
paths:
- ./builds/*
tags:
- windows
错误:
<!-- language: lang-sh -->
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt'...
Submodule 'hfdg' (git@gitlab.XXXXXXXX:user/hfdg.git) registered for path 'hfdg'
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg'...
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitlab.XXXXXXXX:user/hfdg.git' into submodule path 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg' failed
Failed to clone 'hfdg'. Retry scheduled
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg'...
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitlab.XXXXXXXX:user/hfdg.git' into submodule path 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg' failed
Failed to clone 'hfdg' a second time, aborting
问题是 gitlab-runner 没有分配给 subrepo。所以 Runner 没有访问 subrepo 的权限。
我创建了一个带有子模块的新项目,并且想要 运行 一个 gitlab-ci.yml。 但是每次 运行ner 告诉我他没有访问权限或找不到该项目。 运行ner 是 windows10 系统上的共享 运行ner(必需)。它适用于旧项目,但不适用于新项目。
你知道我做错了什么吗?
我已经做了:
- 在另一个 运行ner 上测试
- 为 运行ner 使用 fetch 和 clone
- 运行 手动 git 克隆 --recursive git@gitlab.... 在 运行ner VM
- 在我当前的电脑上递归克隆 repo,它成功了!
- first answer
CI-脚本:
stages:
- build
variables:
ARTIFACTS_OUTPUT_PATH: "./builds"
GIT_SUBMODULE_STRATEGY: recursive
test_123:
stage: build
only:
- tags
- triggers
- schedules
- web
script:
- some commands
artifacts:
paths:
- ./builds/*
tags:
- windows
错误:
<!-- language: lang-sh -->
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt'...
Submodule 'hfdg' (git@gitlab.XXXXXXXX:user/hfdg.git) registered for path 'hfdg'
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg'...
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitlab.XXXXXXXX:user/hfdg.git' into submodule path 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg' failed
Failed to clone 'hfdg'. Retry scheduled
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg'...
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitlab.XXXXXXXX:user/hfdg.git' into submodule path 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg' failed
Failed to clone 'hfdg' a second time, aborting
问题是 gitlab-runner 没有分配给 subrepo。所以 Runner 没有访问 subrepo 的权限。