JENKINS Authentication Fails

35,310

Solution 1

Check this "This build is parameterized " , select the credentials parameter from drop down. Use this

curl -X POST http://jenkins.rtcamp.com/job/Snapbox/buildWithParameters --user "username:password"

It solved my authentication problem.

I hope it will help others too.

Solution 2

My development team's configuration settings were matrix-based security so I had to find my group and give my group workspace access.

1.Click on Manage Jenkins .   
2.Click on Configure Global Security .  
3.in matrix-based security change: 

Overall - Read   
Job - Build  
Job - Read   
Job - Workspace  

Then

    POST jobUrl/buildWithParameters HTTP/1.1
    Host: user:token
    Authorization: Basic dWdlbmxpazo4elhjdmJuTQ==
    Cache-Control: no-cache
    Content-Type: application/x-www-form-urlencoded

    Branch=develop

Solution 3

For me

https://user:[email protected]/job/job_name/build?token=my_token

in https://jenkins.mycompany.org/configureSecurity

disable CORS

hope this help

Solution 4

I provided header Authorization parameter with value : BASIC base_64encoded(username:password) and it worked fine.

Authorization Basic bmltbWljdjpqZX*********

Solution 5

Try using the -u parameter to specify the credentials:

curl -u user:apiToken -X POST http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN

Share:
35,310
nnc
Author by

nnc

Updated on November 09, 2020

Comments