Noel Yap
Noel Yap

Reputation: 19798

How to pass through Jenkins credentials?

I'm trying to follow the advice given in Set Hudson Build Description via Web API but I'm getting a 403 presumably because the request has to be authenticated. Since the script is being run from an authenticated Jenkins session, how do I pass those credentials through?

Upvotes: 1

Views: 1886

Answers (2)

Noel Yap
Noel Yap

Reputation: 19798

Use the 'Execute system Groovy script' Build task which executes in the same VM so you don't have to re-authenticate or manually pass through tokens or credentials.

Upvotes: 0

malenkiy_scot
malenkiy_scot

Reputation: 16615

Looks like you need to pass user and api token in your request. Here's an example (not in Python, but I guess you can manage the translation).

Upvotes: 1

Related Questions