13
votes

On my Jenkins build server, I want to set an Authentication Token so that only users that know the token can fire off builds. (As described here.)

This doc page says that it should be configurable under my job's "Build Triggers" configuration.

However, my server has no such fields, and I'm running the latest version (1.546). Mine looks like this:

this.

As you can see, this doesn't really look like the docs say it should.

How can I set this token?

3

3 Answers

17
votes

You're missing the Trigger builds remotely (e.g., from scripts) Build Trigger:

Trigger builds remotely

This is only visible with Security enabled. To get this option from a freshly downloaded 1.546 WAR, I changed Configure Global Security from Anyone can do anything to at least Logged-in users can do anything. For ease/speed of testing, under Security Realm I selected Jenkins’ own user database and Allow users to sign up:

enter image description here

0
votes

You can go to http://Jenkins-IP/jobs/me/configure to check and change your API access token. Also check whether the user you intend to use has necessary permissions to execute the builds in Manage Jenkins>Configure Global Security

0
votes

Each jenkins user gets an authentication token - applicable since version 1.426 (more).

You can see yours, provided you are logged in your jenkins server, at http://your.jenkins.server/me/configure (press 'show API token' button)

Then you can copy and paste it in your scripts (e.g. see here for an example usage).