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