Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication not working, not reading $HOME/.jira.d/credentials #2

Open
rocketraman opened this issue Jan 30, 2020 · 3 comments
Open

Comments

@rocketraman
Copy link

The gajira-login action creates $HOME/.jira.d/credentials however the CLI does not seem to read it.

@redditblog
Copy link

@rocketraman redditblog

@JesseBowling
Copy link

I'm experiencing the same issue with this workflow:

---
name: Jira CLI

on: push

jobs:
  jira_session:
    runs-on: ubuntu-latest
    steps:
      - name: Setup
        id: setup_jira_cli
        uses: atlassian/[email protected]

      - name: Login to Jira
        id: login_jira
        uses: atlassian/[email protected]
        env:
          JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
          JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
          JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

      - name: Open session
        id: open_session
        run: jira session

This results in the following failure due to prompting for the API-Token:

Run jira session
  jira session
  shell: /usr/bin/bash -e {0}
ERROR EOF
? Jira API-Token [***]:  [? for help] 25l
Error: Process completed with exit code 1.

Similar flows using other Actions (i.e., Create issue) have no issues performing authenticated actions.

@rocketraman
Copy link
Author

A workaround is to add the JIRA_API_TOKEN to the cli action:

      env:
        JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants