I'm trying to setup (initialize) the Jira command-line client, but when I run "jira init" it asks me for my type, server, and email ... and then gives me a 401 error even though my credentials are valid.
$ jira init
? Installation type: Cloud
? Link to Jira server: https://mycompany.atlassian.net
? Login email: myname@mycompany
✗ Received unexpected response '401 Unauthorized' from jira. Please try again.
I also get the error if I use a Jira server of https://api.atlassian.com/ex/jira/mycloudid
All I want to do is use the command line tool, but Jira just gives absolutely useless error messages, and the docs pages are useless too (they said to use the other URL format, but it didn't help).
Does anyone know how to specify a server that won't give me a 401 when I enter my email? I have an active Jira account, I swear!
Did you check this page: https://developer.atlassian.com/cloud/acli/reference/commands/jira-auth-login/
You also need a access token.
Which documentation did you use?
I never even get to a step where I can enter an access token; I hit the 401 error the moment I enter my email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did look at that link, but what the heck is "acli"? I only installed a "jira" binary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With Claude's help (I gave it your URL) I was able to run:
~/bin/acli jira auth login --web
and successfully login over the web. At the command line I saw:
$ ~/bin/acli jira auth login --web
✓ Authentication successful
Welcome, Me
... but I still can't use Jira:
$ ~/bin/jira init
? Installation type: Cloud
? Link to Jira server: https://ourdomain.com
? Login email: me@mycompany.com
✗ Received unexpected response '401 Unauthorized' from jira. Please try again.
I know you're the expert, but given what I'm seeing I'm inclined to believe Claude, who told me:
The acli and jira are two completely separate tools — authenticating with
acli doesn't help jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a side note, it should be the easiest thing in the world for the Jira programmers to change the useless message:
Received unexpected response '401 Unauthorized' from jira. Please try again.
to something that actually helps your users.
It could be instructions, or a link to instructions, or anything else actionable ... but no one benefits from you just saying "Hey user, you got a 401: suck it" (which is more or less what it currently says).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, Claude figured out how to get my Jira data from "acli" without the need of Jira, so (I guess?) my problem is "solved".
The solution, for anyone who comes after me is simple: DO NOT USE THE JIRA COMMAND LINE TOOL! The Jira team makes it incredibly difficult to setup, and when anything goes wrong all you get is a useless HTTP status code (401); zero help whatsoever.
Instead, just get the "acli" tool (or get Claude to get it for you, as I did). It's super-easy to setup (you just authenticate briefly through your web browser), and it can fetch Jira data, so you won't need the "jira" binary.
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.