The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Atlassian CLI: persistent login when using the JIRA CLI

Amol Deshmukh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2011

I'm wondering if there's a way to not have to supply the password with every invocation of the command. I see that there is a "--action login" which returns a token, but when I try to use the token with "--login" option, it still requires me to specify a "--password" which I find a bit odd. I thought I could use the token as a form of cookie with further requests so that I would not be required to specify the password every time.

(edit: I looked up the SOAP API since first posting this question)

The SOAP API seems to use the login token just like a cookie, meaning there is no need to provide a password on every subsequent invokation if the login token is provided (and presumably, active). (Ref: https://bitbucket.org/bob_swift/jira-soap/src/bcf4155b6285/src/itest/resources/ExampleClient.java )

Is this a bug in the CLI or perhaps I'm not using the options right. Any help on this is appreciated.

Thanks!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Bob Swift
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 7, 2011
  1. Normally, you should put your user and password in jira.bat or jira.sh (or similarly for atlassian.bat or atlassian.sh)
  2. The SOAP login token can be saved and re-used, in this case the password is ignored - even though it is still required - use blank for instance
  3. To re-use the SOAP login token, you can use either --login as you mentioned or -l or --loginFromStandardInput with redirection operator < for instance
  4. Some actions use non-SOAP interfaces. These require a valid password.
Amol Deshmukh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2011

Bob,

Thanks. Yes, entering a dummy password (#2) works and solves my problem.

(For security reasons, #1 is not suitable for my scenario - JIRA auth is integrated with our network security and I wouldn't want to put in my network password in plain text in a file. I can tolerate putting the token in a file since at the most, the damage would be limited to someone accessing my JIRA session - not impersonating me on the network in general)

~ amol

TAGS
AUG Leaders

Atlassian Community Events