3
3
This plugin allows you to provide SSH credentials to builds via a
4
4
ssh-agent in Jenkins.
5
5
6
+ This is convenient in some cases.
7
+ Alternately, you can use the generic ` withCredentials ` step to bind an SSH private key to a temporary file
8
+ and then pass that to commands that require it,
9
+ for example using the ` -i ` option to ` ssh ` or ` scp ` .
10
+
6
11
# Requirements
7
12
8
- Currently all ** Windows** nodes (including the master) on which this
9
- plugin will be used must have the [ Apache Tomcat Native
10
- libraries] ( http://tomcat.apache.org/native-doc/ )
11
- installed. As of 1.0 should be unnecessary for Unix nodes. As of 1.14
12
- unnecessary if ` ssh-agent ` is installed.
13
+ You need to have the ` ssh-agent ` executable installed on the agent.
13
14
14
15
# Configuring
15
16
@@ -31,67 +32,6 @@ And then your build will have those credentials available, e.g.
31
32
32
33
From a Pipeline job, use the ` sshagent ` step.
33
34
34
- # Installation Example: MacOSX (10.7.5)
35
-
36
- ** Irrelevant in 1.14+ when ` ssh-agent ` is available in the path.**
37
-
38
- Prerequisites:
39
-
40
- - JDK7. The tomcat native libraries target the java 7 version.
41
- - APR - this seems to be preinstalled in /usr/lib/apr.
42
-
43
- Note that tomcat itself is not needed. This works fine with winstone
44
- (just running jenkins jar from command line).
45
-
46
- Download and extract the tomcat native
47
- library: < http://tomcat.apache.org/download-native.cgi >
48
-
49
- tar -zxvf tomcat-native-1.1.XX-src.tar.gz
50
-
51
- Build the native library:
52
-
53
- cd tomcat-native-1.1.XX/jni/native
54
-
55
- ./configure --with-apr=/usr/bin/apr-1-config
56
-
57
- make && sudo make install
58
-
59
- Build the java interface:
60
-
61
- cd ..
62
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home
63
-
64
- ant build
65
-
66
- ant jar
67
-
68
- Copy the output jar somewhere suitable for inclusion in your jenkins
69
- CLASSPATH.
70
-
71
- Set environment variables prior to starting jenkins:
72
-
73
- export DYLD_LIBRARY_PATH=/usr/local/apr/lib
74
- export CLASSPATH=/path/to/tomcat-native-1.1.XX.jar
75
- java -jar jenkins.war
76
-
77
- Additionally, you might have to add bouncycastle to your JCE providers.
78
- If you attempt to use the plugin and get an exception like the
79
- following:
80
-
81
- java.lang.IllegalStateException: BouncyCastle must be registered as a JCE provider
82
-
83
- Then you may need to configure the jce provider. One way is to do this
84
- right in the JRE, so if Jenkins is using the same jdk as above, edit
85
-
86
- /Library/Java/JavaVirtualMachines/jdk1.7.0\_ 17.jdk/Contents/Home/jre/lib/security/java.security,
87
- and add the following line:
88
-
89
- security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider
90
-
91
- Then, restart jenkins.
92
-
93
- From there, configure using the instructions above.
94
-
95
35
# Version History
96
36
97
37
For new versions, see [ GitHub releases] ( https://github.com/jenkinsci/ssh-agent-plugin/releases ) .
0 commit comments