1. Jenkins一直卡在啟動頁面
需要你進入jenkins的工作目錄,
打開 hudson.model.UpdateCenter.xml
把 http://updates.jenkins-ci.org/update-center.json
改成 :
http://mirror.xmission.com/jenkins/updates/update-center.json
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
http://mirror.esuni.jp/jenkins/updates/update-center.json
中的一個
2. Jenkins離線
解決上述問題方法:
1) 修改 $work_dir/updates/default.json
jenkins在下載插件之前會先檢查網絡連接,其會讀取這個文件中的網址。默認是:
訪問谷歌,將圖下的google改為www.baidu.com即可,更改完重啟服務。
2) 修改$work_dir/jenkins/hudson.model.UpdateCenter.xml
該文件為jenkins下載插件的源地址,改地址默認jenkins默認為:https://updates.jenkins.io/update-center.json,就是因為https的問題,此處我們將其改為http即可,之后重啟jenkins服務即可。
其他國內備用地址(也可以選擇使用):
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
http://mirror.esuni.jp/jenkins/updates/update-center.json
重啟后, 刷新登錄頁面