GitLab private runner 卡在 npm install 上

GitLab private runner stuck on npm install

我正在尝试使用私人运行器而不是共享运行器在 GitLab.com 上设置一个 CI 管道。该项目使用 Node,所以我使用的是 node:6 图片。

.gitlab-ci.yml 看起来像这样:

image: node:6

stages:
    - test

javascript_tests:
    stage: test
    script:
        - npm install
        - npm run test:unit
    when: always

跑步者在 "running" 舞台上停留了大约 30 分钟,然后才开始输出相关内容:

npm ERR! fetch failed 
http://10.252.156.164:4880/@types%2fjsforce/-/jsforce-1.9.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.252.156.164:4880

我该怎么做才能解决这个问题?我认为在 DigitalOcean Droplet 上安装 gitlab-runner 是唯一需要担心的事情。

node:latest 替换 node:6 解决了这个问题。