jenkins插件更换国内源
背景
不过,由于网络原因,有朋友遇到知己访问默认的插件中心访问很慢,甚至出现超时的情况,进而导致插件安装错误。
因此,通常建议将 Jenkins 的插件更新源更换为国内的镜像源,以提高下载速度和稳定性。
解决
制作源
将默认的插件中心换成国内源,例如替换成华为源。
原理:
将updates.jenkins.io/download 替换成 mirrors.huaweicloud.com/jenkins
华为云源
wget https://updates.jenkins.io/update-center.json
sed -i 's|google|baidu|g' update-center.json
sed -i 's|updates.jenkins.io/download|mirrors.huaweicloud.com/jenkins|g' update-center.json
#上传到自己服务器即可
清华大学源
wget https://updates.jenkins.io/update-center.json
sed -i 's|google|baidu|g' update-center.json
sed -i 's|updates.jenkins.io/download|mirrors.tuna.tsinghua.edu.cn/jenkins|g' update-center.json
#上传到自己服务器即可
阿里云源
wget https://updates.jenkins.io/update-center.json
sed -i 's|google|baidu|g' update-center.json
sed -i 's|updates.jenkins.io/download|mirrors.aliyun.com/jenkins|g' update-center.json
#上传到自己服务器即可
腾讯云源
wget https://updates.jenkins.io/update-center.json
sed -i 's|google|baidu|g' update-center.json
sed -i 's|updates.jenkins.io/download|mirrors.cloud.tencent.com/jenkins|g' update-center.json
#上传到自己服务器即可
校园联合版源
wget https://updates.jenkins.io/update-center.json
sed -i 's|google|baidu|g' update-center.json
sed -i 's|updates.jenkins.io/download|mirrors.cernet.edu.cn/jenkins|g' update-center.json
#上传到自己服务器即可
设置源
进入
Manage Jenkins ->Manage Plugin -> Advanced 最下面有 Update Site设置为: https://update.dev6.site/jenkins/updates/update-center.json
即可。
国内源(华为),比较新,buildDate":"Mar 17, 2026"
https://update.dev6.site/jenkins/updates/update-center.json
备用,比较旧,buildDate":"Mar 25, 2025"
https://mirrors.huaweicloud.com/jenkins/update-center.json
文档信息
- 作者: 运维技术团队 - 辣个男人Devin
- 发布日期: 2026年03月23日
- 适用系统: Linux