node.js - GitLab + GitLab CI + Dependent SSH projects via NPM -


currently we're using gitlab manage our repos , gitlab ci our ci.

i have project includes gitlab project dependency (via npm). project internal , url in package.json starts git+ssh://git@, use on our local machines. have ssh keys set up.

however, gitlab ci doesn't seem able use same mechanism install dependent project (via npm install).

the error is:

npm install npm err! git clone git@my.domain.com:developers/my-repo.git cloning 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: remote end hung unexpectedly npm err! error: command failed: host key verification failed. npm err! fatal: remote end hung unexpectedly npm err!  npm err!     @ childprocess.exithandler (child_process.js:658:15) npm err!     @ childprocess.emit (events.js:98:17) npm err!     @ maybeclose (child_process.js:766:16) npm err!     @ socket.<anonymous> (child_process.js:979:11) npm err!     @ socket.emit (events.js:95:17) npm err!     @ pipe.close (net.js:466:12) npm err! if need help, may report *entire* log, npm err! including npm , 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 found in: npm err!     /home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-9/npm-debug.log npm err! not ok code 0 

what missing? need solution doesn't require me change url in package.json.

you need put correct host (my.domain.com) key in ~/.ssh/known_hosts on ci server.

usually removing line key ~/.ssh/known_hosts, , sshing @ least once cache key.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -