-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting 401 Unauthorized with JIRA but no way to debug the root cause #730
Comments
Tried authenticating with both your jira UserId, username and email? |
Tried with username and email as stated in the ticket. Don't really know how to get the User ID from? (it's not visible in my Profile page in JIRA nor do I see it in any URL). |
Can you attach you jira export log? |
I'm not sure I can attach the entire log due to compliance (I might be exposing some internal security information, but sure if there is any there..) _[I][09:01:37] Connecting to Jira... ... at Atlassian.Jira.Remote.JiraRestClient.GetValidJsonFromResponse(IRestRequest request, IRestResponse response) |
I there any way to debug the communication and see why authentication fails? |
Yeah what you see in the log is the only response that Jira is sending. For jira cloud it should work out of the box.
It could indicate that the url, user or token is invalid. Here is how I would invoke the exporter for example:
If nothing works, check the older issues on this board, because this is not a too uncommon issue :) |
Or try a free TCP debugging tool like wireshark to inspect the data traffic and verify that URL and auth header looks correct. |
I am having identical issue. I can confirm that my PAT works if I just curl to my Jira server. The "Last authenticated" field updates in my personal access tokens -page with curl, but when I run the migrator, it does not - which seems to hint that the PAT is not even used. |
I can confirm what @tenderi is sharing. Using Postman in my case to trigger some GET requests on a ticket, results in "Last authenticated" timestamp to update in my JIRA PAT. |
For anyone experiencing this issue in the future, I have notice a quirky behavior when running the tool from a powershell window.
So make sure that your |
I got the exact same issue. It should be stated that TOTP is enabled. I cannot disable this. But it should work with the PAT, as I'm able to use it as a bearer token when using Postman. As others have stated, there's no need to use a username, when using the PAT. Are you using the PAT as a bearer token? 403:
|
I'm trying to use the tool to migrate project requirement data from corporate JIRA instance to corporate on-prem Azure DevOps server.
I've setup all the neccessary configuration and the flow fails at the very start connecting to JIRA server with 401 error
Steps to reproduce the behavior:
example request: GET https://{corporate JIRA server}/rest/api/latest/issue/{some issue ID}
Response is 200 OK.
Authorization is Oauth 2.0 with Bearer token as the PAT
I start the script with
.\jira-export.exe -u {my username} -p {PAT} --url https://{corporate JIRA server} --config {config file} --force
I get
Export complete. Exported 0 items (4 errors, 0 warnings) in 00:00:02.
in the displayed payload, I get:
Encountered a
"401 - Unauthorized"
error while loading this page.Version of the jira-azuredevops-migrator tool is 3.0.115
JIRA verion v9.4.3
I've been testing few variations on the username parameter and even server/API URL,, but I just cannot seem to get it working.
I'm aware there might be too little information and that this may be environment-specific, but is there any way to debug what is actually happening with the authentication/authorization, why can't this tool handle it?
The text was updated successfully, but these errors were encountered: