ankitpokhrel / jira-cli

🔥 Feature-rich interactive Jira command line.
MIT License
3.73k stars 178 forks source link

`jira init` gets 403 on Account with Single Sign On #746

Closed thomaslagies closed 1 week ago

thomaslagies commented 1 week ago

Describe the bug

We use JIRA Cloud and I want to run jira init like this:

image

Please provide following details

  1. JiraCLI Version:

Version="1.5.1", GitCommit="0e0f82d52ef5a775d2cc662fbe38d9732b9b5c59", CommitDate="2024-01-20T10:48:06+00:00", GoVersion="go1.21.5", Compiler="gc", Platform="darwin/arm64"

  1. Are you using Jira cloud or on-premise jira server?

Jira cloud: jira serverinfo is not working, even with exported JIRA_API_TOKEN

image

  1. What operating system are you using? Also mention version.
    macOS Sonoma 14.5
  2. What terminal are you using? Also mention version.
    iTerm 2 Build 3.5.0 with tmux 3.4

To Reproduce

Steps to reproduce the behavior:

  1. Install jira-cli via brew https://github.com/ankitpokhrel/homebrew-jira-cli
  2. Run jira init
thomaslagies commented 1 week ago

My bad, I put the JIRA_API_TOKEN in a temp .env file and sourced it, which seems to not be working?

I did export JIRA_API_TOKEN=xxxx and export JIRA_AUTH_TYPE=bearer

and now I get:

image

thomaslagies commented 1 week ago

I got it working with setting $JIRA_AUTH_TYPE to an empty string