go-jira / jira

simple jira command line client in Go
Apache License 2.0
2.67k stars 326 forks source link

Add Windows (and update Linux) keyring support with zalando/go-keyring #467

Open bkane-msft opened 2 years ago

bkane-msft commented 2 years ago

This PR replaces tmc/keyring (who's latest commit was in 2017) with zalando/go-keyring to update go-jira's keyring support.

go-keyring is:

This PR is an alternative to https://github.com/go-jira/jira/pull/460 (also see https://github.com/go-jira/jira/issues/459) for the reasons above and doesn't require @dougEfresh to maintain a fork. I meant to do this far sooner, but my son was born early!

Testing

I tested on MacOS and Windows with the following config:

config:
  stop: true
endpoint: <endpoint-url>
login: <my-username>
user: <my-username>
password-source: keyring 

and the commands:

go run ./cmd/jira login  # prompt to put password in keyring
go run ./cmd/jira logout  # remove stored JIRA session
go run ./cmd/jira login  # retrieve password from keyring and rebuild session
strider commented 1 year ago

Fixes my issue on MacOS while using keyring and bearer-token Thanks!