我们目前正在使用Nexus 2.10,并成功将它用作npm的回购。在Sonatype Nexus上使用NPM访问GitHub
通过这个代理/镜像本地构建工作正常,但是当试图在Bamboo上运行npm install
(它没有互联网访问)时,它失败了,因为一些依赖尝试到达GitHub下载某个东西,失败。
error 06-feb-2015 13:29:29 npm http 200 https://nexus.shdir.no/content/groups/npm-all/mkdirp/-/mkdirp-0.3.0.tgz
error 06-feb-2015 13:29:30 npm http GET https://nexus.shdir.no/content/groups/npm-all/formidable
error 06-feb-2015 13:29:30 npm http 200 https://nexus.shdir.no/content/groups/npm-all/formidable
error 06-feb-2015 13:29:45 npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:29:55 npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:30:16 npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:31:16 npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:31:37 npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:31:38 npm ERR! network connect ETIMEDOUT
error 06-feb-2015 13:31:38 npm ERR! network This is most likely not a problem with npm itself
error 06-feb-2015 13:31:38 npm ERR! network and is related to network connectivity.
error 06-feb-2015 13:31:38 npm ERR! network In most cases you are behind a proxy or have bad network settings.
error 06-feb-2015 13:31:38 npm ERR! network
error 06-feb-2015 13:31:38 npm ERR! network If you are behind a proxy, please make sure that the
error 06-feb-2015 13:31:38 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
error 06-feb-2015 13:31:38
error 06-feb-2015 13:31:38 npm ERR! System Windows_NT 6.1.7601
error 06-feb-2015 13:31:38 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
error 06-feb-2015 13:31:38 npm ERR! cwd E:\bamboo\UTV-FP-JOB1\code
error 06-feb-2015 13:31:38 npm ERR! node -v v0.10.17
error 06-feb-2015 13:31:38 npm ERR! npm -v 1.3.8
error 06-feb-2015 13:31:38 npm ERR! syscall connect
error 06-feb-2015 13:31:38 npm ERR! code ETIMEDOUT
error 06-feb-2015 13:31:38 npm ERR! errno ETIMEDOUT
我该如何解决这个问题?我必须将每个从github/bitbucket的回购添加到Nexus吗?
Nexus可用,位于npm回购的软件包可从Bamboo获得。这是对Github的直接http调用。是否可以说例如所有对github和bitbucket的https请求都可以通过?为了充分利用网络,可能是不行的,尽管我还没有问过这个问题。而且在本地我们可以完全访问互联网。 – SimenB 2015-02-13 08:26:00