I am trying to build a python script that will build jobs externally but when I am executing it, throws 403 forbidden error for build jobs call other get APIs are working fine. Below is the python snippet.

j=jenkins.Jenkins('http://localhost:8080/login?from=%2F', 'admin', 'admin@123' )





Jenkins details: I am able to create & build jobs from UI successfully. My Jenkins version is 2.237.

Other settings.

  • logged in user can do anything. Csrf protection is disabled. On the other hand my friend having the same script and version of Jenkins is able to build job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.