jira-cmd: jira ls - no issues => implement better error handling
Just installed jira cmd
and jira ls gives me no issues.
I’m using jira cloud (not hosted jira).
I guess that something is happening under the hood but no error is thrown so I can tell what is the cause.
jira -V
v0.5.4
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 26 (12 by maintainers)
Commits related to this issue
- fixes #92 — committed to palashkulsh/jira-cmd by palashkulsh 6 years ago
Some organizations disable Basic auth entirely - regardless if you use a password or an API token - and there the solution is to use the HTTP header
Authorization: Bearer <apitoken>.I used an ugly workaround to find/replace all “Basic” with “Bearer”, and made sure config.auth.token was the API token generated by JIRA.
Looks like some mixup on documenting the solution when using a token instead of a password. The issued referred to just above (#93) points to a commit that has nothing to do with documenting the solution here.
So to save some other folks time in figuring it out, here is what should be documented from my experiments ultimately leading to a successful connection for an OAuth-based login.
Navigate to your Atlassian token management page: https://id.atlassian.com/manage-profile/security/api-tokens
Create a token; call it whatever you want; but you should end up something like this:
Copy that token.
If you have already tried configuring
jira-clidelete your~/.jira/config.jsonfile.Run
jirato start the configuration again.Go through the dialog, but instead of entering a password, enter the token from line (3).
The output should be
No worries, thx for an effort. Documentation for it here: https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/
sure, let me share a branch with you which can enable more verbose logs. give me 5 mins.