我跑在特拉維斯CI以下命令我build:爲什麼Travis CI無法連接到GitHub API?
before_install:
- curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
script:
- sudo composer -nqq update
我手動安裝作曲家我想用sudo
它,因爲它的安裝只爲用戶。
這我有錯誤是:
Updating dependencies (including require-dev)
- Installing jakub-onderka/php-console-color (0.1)
Downloading: Connecting... Failed to download jakub-onderka/php-console-color from dist: The "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1" file could not be downloaded (HTTP/1.1 403 Forbidden)
Now trying to download from source
- Installing symfony/yaml (v2.7.4)
Downloading: Connecting... Failed to download symfony/yaml from dist: The "https://api.github.com/repos/symfony/Yaml/zipball/2dc7b06c065df96cc686c66da2705e5e18aef661" file could not be downloaded (HTTP/1.1 403 Forbidden)
Now trying to download from source
我已經試過這些鏈接,他們工作得很好。
這是否意味着Travis阻止GitHub API出於某種原因?如果不是,我該如何解決?通過修復,我的意思是要麼知道發生了什麼,要麼取消這些錯誤信息(例如,通過使用composer
中的一些特殊參數或更改JSON文件以強制從源下載)。
我composer.json
文件是:
{
"config": {
"vendor-dir": "/var/lib/vendor",
"bin-dir": "/usr/local/bin"
},
"require": {
"drush/drush": "dev-master"
}
}
爲參考,全面.travis.yml
樣子:
before_install:
- env
- curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
- sudo apt-get -qy update
install:
- sudo apt-get install vagrant
script:
- set -e # This makes build to fail on first error.
- sudo composer -nqq update
- make
- make vm
after_failure:
- sudo apt-get -qy install tree && - tree -d -L 6 # Print directory structure in the form of a tree.
- env
sudo: true
language: php
python:
- "5.5"