到位桶速率限制phantomjs(bitbucket rate limiting phantomjs

2019-09-28 03:03发布

我的CI构建保持与失败:

> phantomjs@1.9.7-15 install /home/travis/build/redgeoff/paste-image/node_modules/mocha-phantomjs/node_modules/phantomjs
> node install.js
PhantomJS detected, but wrong version 1.9.8 @ /usr/local/phantomjs/bin/phantomjs.
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2
Receiving...

Error requesting archive.
Status: 403
Request options: {
  "uri": "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2",
  "encoding": null,
  "followRedirect": true,
  "headers": {},
  "strictSSL": true
}
Response headers: {
  "x-amz-request-id": "31FE6AEAF3807721",
  "x-amz-id-2": "ePama6pBgS1VdgDLGaFpUxLSmqkm0KJ/mflR8jUU28aPteacBzcKHeoQf18F+Sz7KKrn5UzGMVE=",
  "content-type": "application/xml",
  "transfer-encoding": "chunked",
  "date": "Fri, 16 Sep 2016 06:56:57 GMT",
  "server": "AmazonS3"
}
Make sure your network and proxy settings are correct.

这似乎是由于速率限制bitbucket.org。 我怎样才能避免这些错误?

Answer 1:

只需一个链接导出到不同的二进制位置,例如export PHANTOMJS_CDNURL=http://cnpmjs.org/downloads

例如,如果你正在使用TravisCI你可以使用:

  global:
    - PHANTOMJS_CDNURL=http://cnpmjs.org/downloads

在CircleCI,您可以使用以下命令:

machine:

  environment:
    # Use a CDN to prevent bitbucket rate limits when downloading phantomjs
    PHANTOMJS_CDNURL: http://cnpmjs.org/downloads


文章来源: bitbucket rate limiting phantomjs