-
Notifications
You must be signed in to change notification settings - Fork 64
feat: GitHub CLI authentication support #438
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
base: master
Are you sure you want to change the base?
Conversation
This was tricky to test! What I've done is add a build tag of Lemme know if this is overkill @alecthomas. |
3e60696
to
3cb0c64
Compare
Add support for using GitHub CLI (`gh`) as an authentication provider for Hermit via a user config (`gh-cli-auth`), enabling seamless integration with `gh auth token`. This simplifies authentication for private packages and repositories by eliminating the need to manually set HERMIT_GITHUB_TOKEN.
3cb0c64
to
12678ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me. Just had one more little comment.
@@ -0,0 +1,251 @@ | |||
package github |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool
91d4d33
to
10ad512
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a maintainer but looks LGTM to me
Appreciate the review @nickajacks1 |
Adds support for using GitHub CLI (
gh
) as an authentication provider for Hermit, eliminating the need to manually setHERMIT_GITHUB_TOKEN
.Exposing
HERMIT_GITHUB_TOKEN
securely across many developer environments is tricky to do safely without exposing it to other tools or distributing shell wrappers for hermit. Usinggh auth token
allows for short-lived tokens that are only exposed to hermit as needed.This feature is enabled via setting the following in the user hermit config (~/.hermit.hcl):