- about
- There were errors checking the update sites: UnknownHostException: updates.jenkins.io
- HTTP ERROR 403 No valid crum was included in the request
- 出現一個錯誤:無法連接到Jenkins
- 安裝過程中出現一個錯誤: No such plugin: cloudbees-folder
- Error 403 No valid crumb was included in the request
- Please wait while Jenkins is getting ready to work
- Jenkins提示:反向代理設置有誤
- apt-get無法安裝vim等工具
- Failed to connect to repository : Command "git ls-remote -h -- https://github.com/xxx/xxxx.git HEAD" returned status code 128:
about
本篇收集在Jenkins中出現的問題,及處理辦法。
There were errors checking the update sites: UnknownHostException: updates.jenkins.io
基於jenkinsci/blueocean:latest鏡像的jenkins2.222.3
當我在將服務器的jenkins容器遷移到本地虛擬機中后,在插件管理中遇到了這個問題:
原因可能是你本地的網絡環境無法訪問外網.......
解決辦法:
- 在插件中心的高級選項中,下拉升級站點,將原地址
https://updates.jenkins.io/update-center.json
改為https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
,然后點擊保存:
- 重啟你的jenkins,不能行的話重啟虛擬機吧。直到如上圖右下角沒有報錯為止。此時,你也能下載插件了:
總之,你要考慮的是你的網絡問題!不過,要是網絡環境下載國外的插件沒啥問題的,搞jenkins也沒這么多事兒了
HTTP ERROR 403 No valid crum was included in the request
基於jenkinsci/blueocean:latest鏡像的jenkins2.222.3
有的時候,你在使用jenkins提交數據的時候,可能會遇到:
解決辦法:打開管理
▶全局安全配置
,下拉選擇CSRF Protection
:
完事點擊保存。
see also:Jenkins -> 403 No valid crumb was included in the request
出現一個錯誤:無法連接到Jenkins
環境:centos7.4 + Jenkins 2.222.3
在初始化的時候,遇到上述錯誤,可能的原因是,配置文件權限出了問題......解決辦法:
- 關閉Jenkins服務:
[root@r ~]# sudo systemctl stop jenkins
- 備份一下配置文件:
[root@r ~]# cp /var/lib/jenkins/config.xml /var/lib/jenkins/config.xml.bak20200519
[root@r ~]# ls /var/lib/jenkins/config.xml*
/var/lib/jenkins/config.xml /var/lib/jenkins/config.xml.bak20200519
-
修改配置文件,參考下圖修改。
-
重啟Jenkins服務,然后在瀏覽器訪問即可。
[root@r ~]# sudo systemctl start jenkins
參考:enkins出現一個錯誤 無法連接到Jenkins如何解決
安裝過程中出現一個錯誤: No such plugin: cloudbees-folder
環境:win10 + tomcat8.5.54 + jenkins 2.222.3
在初始化安裝推薦插件的時候,報了如上錯誤,我懷疑是我之前中斷過安裝插件過程......whatever,來看解決辦法:
- 打開http://ftp.icm.edu.pl/packages/jenkins/plugins/cloudbees-folder/,下拉選擇
latest
版本,找到其中cloudbees-folder.hpi
,並將其下載到本地。
- 將
cloudbees-folder.hpi
文件拷貝到你tomcat的安裝目錄中的\webapps\jenkins\WEB-INF
目錄內。
- 重啟Tomcat服務,然后重新訪問Jenkins即可。
參考:安裝jenkins時出現 No such plugin: cloudbees-folder的解決辦法
Error 403 No valid crumb was included in the request
解決辦法是:
管理Jenkins(Manage Jenkins)
▶配置全局安全(Configure Global Security)
選項,下拉選擇取消防止跨站點請求偽造(Prevent Cross Site Request Forgery exploits)
:
參考:https://blog.csdn.net/wanglin_lin/article/details/73849146 | Jenkins Error: 403 No valid crumb was included in the request
Please wait while Jenkins is getting ready to work
環境:docker中的Jenkins
一般在啟動后出現如上的提示時,一直在准備,然后就一直等,可能的原因是,國內訪問某些網站總會遇到各種問題。
解決辦法:
打開Jenkins的工作目錄的hudson.model.UpdateCenter.xml
文件, 修改文件中的url部分,將默認的國外的地址改為國內的清華大學的源(如果遇到vim
沒有安裝,就先apt-get update
一下,然后再apt-get install vim
即可):
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://updates.jenkins.io/update-center.json</url>
</site>
</sites>
修改為:
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url>
</site>
</sites>
然后重啟Jenkins鏡像即可。
參考:Jinkins 啟動時 Please wait while Jenkins is getting ready to work ... | 部署jenkins服務器出現Please wait while Jenkins is getting ready to work ...一直進不去該怎么辦?
Jenkins提示:反向代理設置有誤
解決辦法就是配置上正確的URL。
管理Jenkins(Manage Jenkins)
▶系統設置(Configure System)
▶Jenkins Location
:
參考:
apt-get無法安裝vim等工具
原因是需要更新apt-get,即同步 /etc/apt/sources.list
和 /etc/apt/sources.list.d
中列出的源的索引,這樣才能獲取到最新的軟件包。
然后正常的使用apt-get install vim -y
即可。
Failed to connect to repository : Command "git ls-remote -h -- https://github.com/xxx/xxxx.git HEAD" returned status code 128:
jenkinsci/blueocean:latest
在部署項目時,遇到無法連接Git倉庫的情況,網上有說是因為git版本太低, 還有說需要配置公鑰和私鑰來解決問題的。這里就以配置公鑰私鑰來解決問題。
參考:配置GitHub SSH key
參考:Jenkins 部署項目出現 Failed to connect to repository : Command "git ls-remote -h http://gitlab. 128
歡迎斧正,tha'ts all