jenkins安裝git插件遇到的問題


1、安裝了jenkins(但是安裝后不知道怎么查看安裝的是jenkins的版本)

2、通過系統設置->插件管理中->可選插件或高級,我的可選插件中沒有信息,所以我通過高級中的上傳插件的方式安裝插件的

3、安裝git.hpi插件前,需要安裝git_client.hpi插件、scm-api.hpi插件、workflow-setp-api.hpi插件、workflow-scm-setp.hpi插件,否則安裝git.hpi時會報錯,錯誤提示如下:

java.io.IOException: Failed to dynamically deploy this plugin
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install git plugin
	at hudson.PluginManager.dynamicLoad(PluginManager.java:474)
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
	... 5 more
Caused by: java.io.IOException: Dependency scm-api (1.0), workflow-scm-step (1.14.2), git-client (1.19.6) doesn't exist
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
	at hudson.PluginManager.dynamicLoad(PluginManager.java:464)
	... 6 more

請按順序安裝負責安裝(可根據錯誤提示調整安裝順序)插件是可能提示依賴的插件未安裝,如先安裝了workflow-scm-step.hpi時未安裝workflow-setp-api.hpi則會提示錯誤

java.io.IOException: Failed to dynamically deploy this plugin
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install workflow-scm-step plugin
	at hudson.PluginManager.dynamicLoad(PluginManager.java:474)
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
	... 5 more
Caused by: java.io.IOException: Dependency workflow-step-api (1.14.2) doesn't exist
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
	at hudson.PluginManager.dynamicLoad(PluginManager.java:464)
	... 6 more

注釋:插件的版本號需要根據git插件依賴中提到的版本號安裝,
scm-api (1.0), workflow-scm-step (1.14.2), git-client (1.19.6) 
workflow-setp-api.hpi(1.14.2)(貌似與workflow-scm-step保持一致)

4、前面的插件安裝完成后,下載git插件git.hpi(https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin)

安裝version:2.5.3的git.hpi報錯(如下),在網上查了一下,有人在部署war文件是類似錯誤說是因為java的版本問題,編譯時用的java jdk的版本與發布的服務器上

java jdk版本不一致導致的,也可能是下載的2.5.3有問題吧,具體原因不明,但是經測試,換成2.5.2就不會出現此問題,2.5.1,2.5.0仍然會出現此問題

java.io.IOException: Failed to dynamically deploy this plugin
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(Unknown Source)
	at java.util.zip.ZipFile.<init>(Unknown Source)
	at java.util.jar.JarFile.<init>(Unknown Source)
	at java.util.jar.JarFile.<init>(Unknown Source)
	at hudson.ClassicPluginStrategy.getShortName(ClassicPluginStrategy.java:107)
	at hudson.PluginManager.dynamicLoad(PluginManager.java:439)
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
	... 5 more
總結:安裝git插件時,在官網下載git的頁面中有對其他依賴插件的提示,如下圖所示:

 

 

 
       


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM