jenkins 更新插件使用代理

方法一:

 管理插件页面配置如下:

这个 URL 改成
http://mirror.xmission.com/jenkins/updates/update-center.json 或
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

方法二:

使用nginx自定义代理插件(清华镜像)

nginx配置文件如下:

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 Accept-Language "zh-CN";
        }
        index index.html index.htm index.php;
        #error_page   404   /404.html;
        location ~ /\.
        {
            deny all;
        }

        access_log  /var/log/nginx/jenkins_proxy.access.log main;
        error_log   /var/log/nginx//jenkins_proxy.error.log;
    }

 

posted @ 2019-12-18 16:13  lvelvis  阅读(5037)  评论(0编辑  收藏  举报
#####