Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Jenkins jobs have config.xml files that store the configuration of that job.

I have a "job manager" job that modifies the configuration of other jobs, but I can't seem to get it to acknowledge the new configuration without restarting Jenkins.

The jenkins-cli.jar command line tool strangely doesn't seem to have an option for this action.

It is possible to edit the configuration through the web interface, and have that save/acknowledged without a restart, so it doesn't seem that it would be a technical impossibility.

My best try was to try and post to the same address that the web interface does

wget --post-file=config.xml --user=joe.shmoe --password=secret01 \
     --no-check-certificate                                      \

...but I get a 403 despite using valid credentials (copy pasted to ensure no typos)

Anyone have any ideas or know something simple that I'm missing?

share|improve this question
holy crap. THAT ACTUALLY WORKS !!! (with the authentication fixed as Catskul suggests below, or in my case with no auth) I've been looking for this technique for hours now... – Dave Dopson Nov 8 '11 at 2:14
up vote 5 down vote accepted

It turns out the crutial info seems to be wget's "--auth-no-challenge" option which apparently is for obscure webserver configurations like Jenkins that don't follow expected protocol:

wget --auth-no-challenge --user=joe.shmoe --password=secret  \
     --post-file=config.xml --no-check-certificate           \
share|improve this answer

I prefer curl....

curl "http://localhost:18080/jenkins/job/npm-package-aaa/config.xml" -si --data-binary "$XML" -H "Content-Type: text/xml" 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.