Hello,
I am new to Jira and it is not my core competency. I am just trying to create BASH script, This script will read a text file with jira issues, complete the non jira task and update the jira issue.
I am using the curl to update the jira. like below
curl -D- -k -u $WINDOWS_USERNAME:'$WINDOWS_PASSWORD' -X PUT --data '{\"name\":\"$WINDOWS_USERNAME\"}' -H \"Content-Type:application/json\" https://jira.XXXXXXcom/rest/api/2/issue/$TASKNO/assignee"
This works from command prompt. But when run through the script. I get some time password issues and CAPTCHA issues and need Jira admin help to clear the account.
is there a better way like OAUTH or cookies and how to use then in bash script?
help is appreciated?
Hi Bhushan
welcome to the Atlassian community.
You should have a look to personal access tokens which are available starting with Jira 8.14
https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
Cheers
Kurt
thank You Kurt fort helping....
Hope I will get it right.
Cheers
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kurt,
I hope you will be able to help me here.
After looking into this, I just realized that our Jira version is 8.13.
So which method I should be using to connect to JIRA using CURL in Version 8.13?
Cheers
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhushan
https://developer.atlassian.com/server/jira/platform/security-overview/ lists the potential options pre 8.14 which are basic auth, cookie based and oauth.
Oauth would be the preferred one but i am not sure how this would be done in a bash script.
If a language like python would be an option, than you could take a look at https://shreya-goyal.medium.com/authenticating-jira-rest-api-in-python-and-creating-issues-oauth-4780c58fd478
Cheers
Kurt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank your Kurt,
look like I got what I wanted, The problem with bash is that escape characters need to be added at every double quotes. I will update the thread once I am confident that I resolved all issues and script is working correctly.
regards
Bhushan
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.