最近のマイナー8.xのアップグレード後、別のリポジトリも取得するGitLab CIテストを実行できません。以前はすべてが機能していましたが、現在は有名になっていますホストキーの確認に失敗しました。 sshのエラーメッセージ。これの原因は何でしょうか?GitLab CIランナー - 他のリポジトリにアクセスできない
/etc/gitlab-runner/config.toml
:
concurrent = 1
[[runners]]
name = "[email protected]"
# ...
executor = "docker"
[runners.docker]
image = "edoburu/python-runner"
privileged = false
cap_drop = ["DAC_OVERRIDE"]
volumes = [
"/cache",
"/home/deploy/.ssh:/root/.ssh:ro"
]
# ...
あなたが見ることができるように、.ssh
フォルダはコンテナにすべての既知のホスト(/home/deploy/.ssh/known_hosts
)のリストを与えるために、公開されます。これはまた、コンテナに既知のSSH鍵を提供します。これは、リポジトリにデプロイメントキーとして有効にしました。
しかし、ビルドが前にそれを行うなかった、今日では失敗します。.gitlab-ci.yml
ファイルが含まれてい
Obtaining python-extra from [email protected]:myproject/[email protected]#egg=python-extra (from -r src/requirements.txt (line 63))
Cloning [email protected]:myproject/python-extra.git (to 889f8fa0fe485d246d106ccee47aa60b2dd2523e) to /builds/myproject/env/src/python-extra
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Command "git clone -q [email protected]:myproject/python-extra.git /builds/project/env/src/python-extra" failed with error code 128 in None
:
test:
image: edoburu/python-runner:base
stage: test
script:
- virtualenv --no-site-packages ../env
- source ../env/bin/activate
- pip install --exists-action=w -r src/requirements.txt
- pip install coverage
- coverage run --source=src --omit='*/migrations/*' ./src/runtests.py -v2
- coverage report -m
私はしかし、手動でコンテナを入力すると、すべてが正常に動作します:
[email protected] ~ $ docker run -it --volume="/home/deploy/.ssh:/root/.ssh:ro" edoburu/python-runner:base /bin/bash
[email protected]:/# ssh [email protected]
PTY allocation request failed on channel 0
Welcome to GitLab, Anonymous!
Connection to git.example.org closed.
[email protected]:/# git clone [email protected]:myproject/python-extra.git
Cloning into 'python-extra'...
remote: Counting objects: 387, done.
remote: Compressing objects: 100% (176/176), done.
remote: Total 387 (delta 215), reused 374 (delta 208)
Receiving objects: 100% (387/387), 5.97 MiB | 0 bytes/s, done.
Resolving deltas: 100% (215/215), done.
Checking connectivity... done.
[email protected]:/# exit
[email protected] ~ $
GitLabとは何か異なりますか? IPアドレスなどを割り当ててビルドに失敗することがありますか?