目前我们使用 GitLab 来管理我们的 repos 和 GitLab CI 作为我们的 CI。
我有一个项目,其中包含另一个 GitLab 项目作为依赖项(通过 NPM)。该项目是内部的,并且 package.json 中的 URL 以 开头git+ssh://git@
,这是我们在本地机器上使用的。我们设置了 SSH 密钥。
但是,GitLab CI 似乎无法使用相同的机制来安装这个依赖项目(通过npm install
)。
我得到的错误是:
npm install
npm ERR! git clone git@my.domain.com:developers/my-repo.git Cloning into bare repository '/home/gitlab_ci_runner/.npm/_git-remotes/git-my-domain-com-developers-my-git-26043eba'...
npm ERR! git clone git@my.domain.com:developers/my-repo.git
npm ERR! git clone git@my.domain.com:developers/my-repo.git Host key verification failed.
npm ERR! git clone git@my.domain.com:developers/my-repo.git fatal: The remote end hung up unexpectedly
npm ERR! Error: Command failed: Host key verification failed.
npm ERR! fatal: The remote end hung up unexpectedly
npm ERR!
npm ERR! at ChildProcess.exithandler (child_process.js:658:15)
npm ERR! at ChildProcess.emit (events.js:98:17)
npm ERR! at maybeClose (child_process.js:766:16)
npm ERR! at Socket.<anonymous> (child_process.js:979:11)
npm ERR! at Socket.emit (events.js:95:17)
npm ERR! at Pipe.close (net.js:466:12)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.2.0-68-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-9
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code 128
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-9/npm-debug.log
npm ERR! not ok code 0
我们缺少什么?我需要一个不需要我更改package.json
.