插件下載失敗割捅,超時(shí)秃踩。比如:
解決方案:
一.升級(jí)站點(diǎn),更改為清華鏡像
http://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json?這個(gè)文件里面 包含了所有插件的更新地址 清華把這個(gè)文件鏡像過來了 ,但是沒有把里面的插件升級(jí)地址改成清華糟秘。 這樣只會(huì)獲取更新信息快,實(shí)際下載不快球散。要想真正加快下載速度尿赚,需要欺騙Jenkins去清華真實(shí)下載插件,實(shí)際上只要把mirrors.jenkins-ci.org代理到mirrors.tuna.tsinghua.edu.cn/jenkins即可蕉堰。參考解決方案2.
二.nginx反向代理到清華凌净。
1.下載安裝nginx:http://nginx.org/en/download.html,Windows直接下載解壓屋讶,無需安裝冰寻,最好路徑不要有中文。
2.配置反向代理皿渗。找到nginx.conf文件
配置如下
server
? ? {
? ? ? ? listen 80;
? ? ? ? server_name mirrors.jenkins-ci.org;
? ? ? ? location / {
? ? ? ? ? ? proxy_redirect off;
? ? ? ? ? ? proxy_pass https://mirrors.tuna.tsinghua.edu.cn/jenkins/;
? ? ? ? ? ? proxy_set_header X-Real-IP $remote_addr;
? ? ? ? ? ? proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
? ? ? ? ? ? proxy_set_header Accept-Encoding "";
? ? ? ? ? ? #proxy_set_header User-Agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.49 Safari/537.36";
? ? ? ? ? ? proxy_set_header Accept-Language "zh-CN";
? ? ? ? }
? ? ? ? index index.html index.htm index.php;
? ? ? ? #error_page? 404? /404.html;
? ? ? ? location ~ /\.
? ? ? ? {
? ? ? ? ? ? deny all;
? ? ? ? }
? ? }
3.雙擊啟動(dòng)nginx斩芭。
4.配置HOST轻腺,添加
127.0.0.1mirrors.jenkins-ci.org
5.插件下載秒完成。