-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: get a GitHub Access Token from keyring #3174
Draft
suzuki-shunsuke
wants to merge
15
commits into
main
Choose a base branch
from
feat-keyring
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I could confirm this feature works well on macOS. $ aqua token set
Enter a GitHub acccess token for aqua:
FATA[0011] aqua failed aqua_version=2.37.0-1 env=linux/arm64 error="set a GitHub access Token to the secret store: set a GitHub Access token in keyring: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'" program=aqua
$ gnome-keyring version
gnome-keyring: 46.1 |
This was referenced Oct 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds the feature to get a GitHub Access token from a secret store such as Windows Credential Manager, macOS Keychain, and GNOME Keyring.
You can manage a GitHub Access Token securely.
This feature is powered by the third party library zalando/go-keyring.
This feature is disabled by default.
To enable this feature, you have to configure the environment variable
AQUA_ENABLE_KEYRING
.export AQUA_ENABLE_KEYRING=true
And you have to set a GitHub Access token by
aqua token set
command.aqua token set
You can also pass a GitHub Access token from stdin.
Then you can use aqua as usual.
When aqua accesses a secret store, you may need to approve the access via prompt.
If the environment variable
GITHUB_TOKEN
orAQUA_GITHUB_TOKEN
is set, this feature is ignored.And even if aqua can't get a GitHub Access Token, aqua still works without a GitHub Access Token.
Performance Test
Access to secret store makes the performance worse, so we implement the lazy load, meaning aqua accesses a secret store only when the access is really necessary.
I confirmed that when aqua didn't access a secret store, the performance didn't get worse.