STDERR: java.io.IOException: no se pudo copyr git a /var/lib/jenkins/plugins/git.jpi

Esto está relacionado con cualquiera que esté usando chef para instalar los plugins de jenkins y jenkins.
Recibo este error cuando bash instalar el complemento 'git' usando el libro de recetas opscode-cookbooks / jenkins.

Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '255' ---- Begin output of java -jar /var/chef/cache/jenkins-cli.jar -s http://localhost:8080 install-plugin git ---- STDOUT: Installing a plugin from local file: git STDERR: java.io.IOException: Failed to copy git to /var/lib/jenkins/plugins/git.jpi at hudson.FilePath.copyTo(FilePath.java:1989) at hudson.cli.InstallPluginCommand.run(InstallPluginCommand.java:85) at hudson.cli.CLICommand.main(CLICommand.java:237) at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:326) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:301) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:260) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63) at hudson.remoting.CallableDecoratorAdapter.call(CallableDecoratorAdapter.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: remote file operation failed: git at hudson.remoting.Channel@3ca34885:CLI channel from /127.0.0.1: java.io.FileNotFoundException: git (Is a directory) at hudson.FilePath.act(FilePath.java:985) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.copyTo(FilePath.java:2010) at hudson.FilePath.copyTo(FilePath.java:1984) ... 22 more Caused by: java.io.FileNotFoundException: git (Is a directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at hudson.FilePath$41.invoke(FilePath.java:2015) at hudson.FilePath$41.invoke(FilePath.java:2010) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2688) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to CLI channel from /127.0.0.1(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:753) at hudson.FilePath.act(FilePath.java:978) ... 25 more ---- End output of java -jar /var/chef/cache/jenkins-cli.jar -s http://localhost:8080 install-plugin git ---- Ran java -jar /var/chef/cache/jenkins-cli.jar -s http://localhost:8080 install-plugin git returned 255 Cookbook Trace: --------------- /var/chef/cache/cookbooks/jenkins/libraries/_executor.rb:79:in `execute!' /var/chef/cache/cookbooks/jenkins/libraries/plugin.rb:125:in `block (2 levels) in <class:JenkinsPlugin>' /var/chef/cache/cookbooks/jenkins/libraries/plugin.rb:137:in `block in <class:JenkinsPlugin>' Resource Declaration: --------------------- # In /var/chef/cache/cookbooks/prsn_jenkins/recipes/plugins.rb 3: jenkins_plugin plugin if flag 4: end Compiled Resource: ------------------ # Declanetworking in /var/chef/cache/cookbooks/prsn_jenkins/recipes/plugins.rb:3:in `block in from_file' jenkins_plugin("git") do action :install retries 0 retry_delay 2 guard_interpreter :default cookbook_name "prsn_jenkins" recipe_name "plugins" version :latest end 

mi libro de cocina utiliza el opscode-cookbook / jenkins. Así es como se ve mi libro de cocina:

Archivo de atributo:

  default['plugin_jenkins']['plugins'] = { 'active-directory' => {:enable => true}, 'git-client' => {:enable => true}, 'git' => {:enable => true} } 

Archivo de receta:

 node['plugin_jenkins']['plugins'].each do |plugin, flag| jenkins_plugin plugin if flag end 

Si está utilizando opscode-cookbooks / jenkins, debería considerar actualizar ese libro de cocina. ¡El último libro de cocina (v2.3.1) parece resolver este problema!