Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{jenkins-plugin-info:ssh-agent|jiraComponent=ssh-agent|sourceDir=ssh-agent-plugin}

SSH Agent Plugin

Excerpt

This plugin allows you to provide SSH credentials to builds via a ssh-agent in Jenkins.

Requirements

Currently all Windows nodes (including the master) on which this plugin will be used must have the Apache Tomcat Native libraries installed. As of 1.0 should be unnecessary for Unix nodes. As of 1.14 unnecessary if ssh-agent is installed.

...

Download and extract the tomcat native library: http://tomcat.apache.org/download-native.cgi

No Format

tar -zxvf tomcat-native-1.1.XX-src.tar.gz

Build the native library:

No Format

cd tomcat-native-1.1.XX/jni/native

./configure --with-apr=/usr/bin/apr-1-config

make && sudo make install

Build the java interface:

No Format

cd ..
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home

ant build

ant jar

...

Set environment variables prior to starting jenkins:

No Format

export DYLD_LIBRARY_PATH=/usr/local/apr/lib
export CLASSPATH=/path/to/tomcat-native-1.1.XX.jar
java -jar jenkins.war

Additionally, you might have to add bouncycastle to your JCE providers. If you attempt to use the plugin and get an exception like the following:

No Format

java.lang.IllegalStateException: BouncyCastle must be registered as a JCE provider

...

/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/security/java.security, and add the following line:

No Format

security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider

...

From there, configure using the instructions above.

Version History

Version 1.15 (2017-04-06)

  • issue@42093 Fixed quoting for askpass in command-line implementation. 

Version 1.14 (2017-02-10)

  • JENKINS-36997 New default implementation that uses command-line ssh-agent. Should fix various problems with crypto APIs, docker.image(…).inside {sshagent(…) {…}}, etc.
  • JENKINS-38830 Track credentials used in the wrapper.
  • JENKINS-35563 Fixes to credentials dropdown.

...