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;
    }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM