Within Jenkins, I have configured JIRA Issue updater plugin. I have configured credentials (JIRA username and password) in the job along with the REST base URL as https://some-company/rest/api/latest. I am getting the following error..
Unable to connect to REST service java.io.IOException: Server returned HTTP response code: 401 for URL: https://some-company.atlassian.net/rest/api/latest/search?jqlFinished: SUCCESS
Do I need to use any other authentication mechanism to access JIRA via Jenkins? any inputs are appreciated.
I have generated an API token and used REST API. It just worked fine for me.
You are getting back a 401, which means that JIRA is able to get it and is saying that the user is not authenticated.
So as mentioned by @Thomas Deiler, the first step would be to make use of a ReST client like Postman and test of the call to the endpoint is working good. Ideally you could make use of Basic Auth and Postman will help you do it.
Second, trace the call from Jenkins and compare the auth type and auth itself that Jenkins sends and check if there is any mismatch. It can many a time be a Jenkins Plugin error or even a stray character getting into the credentials. So once you get the request headers, do a base64 decode (if Basic Auth is used) and check the credentials are right.
Once you are done with these two steps, you would get a fair idea of what's going wrong.
Kindly get back with the results of the above two steps.
Do let me know if you need any help of these.
Thanks
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Kalyan Raj Sista,
best you start with a REST Client (eg. browser extension) to figure out if it works at all. Please report back if there is some progress.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.