Repository navigation
Conversation
|
Thanks for your pull request! This is a large change (1301 lines across 19 files) that doesn't reference a Large feature PRs require prior discussion in an issue before implementation — this helps the team assess whether the feature aligns with the project's direction before significant effort is invested. Please open an issue to discuss this feature first. This PR will be automatically closed in 2 days if requirements are not met. Full contribution requirements
|
|
You should file a new issue with your use case. Couple of random drive by thoughts:
|
|
Thanks for the work you've put into this, @ilyaro. Adding to Will's thoughts, I don't think we should couple gh's authentication to a specific password manager. This reaches beyond storing a token: login, token refresh, logout, and error handling would all carry 1Password-specific behavior for us to maintain. A more general interface could avoid that coupling, but it brings its own challenges. We'd need to work through the security implications of delegating credential handling to external programs, including how access is authorized and failures are handled. That needs a design discussion across different stores and platforms before we commit to supporting an interface. I'm going to close this PR rather than ask you to keep investing in an implementation before we've agreed on an approach. As Will suggested, please open an issue describing your use case so we can discuss the requirements separately from this implementation. |
Releated to #5961
Description
Added support of 1password to save tokens and refresh tokens, instead of the default location
gh auth login --op
For security reasons and In corporates especially, it is very important to access the gh token in a secured way
We started to work like this, any time we need to access gh token, we use Fingerprint to get it from 1password
This way it is not possible to get the token freely when it saved in keychain, and any plugin of VScode or any code running on the machine can get it
We build the gh on MAC (we work on MAC only, not tested on Win or Linux) and now use it always like this
So the code is saving tokens in 1Password instead of keychain if --op flag is given, and makes it the default
Reads the tokens from 1Password and refreshes them to 1Password only
-->
How did you test this change?
I use the 1password supported gh I build for 2 weeks now and used it on 2 MAC laptops
I use it in everyday work in production with EMU and non EMU organizations at work
gh --version
gh version 0.0.4-fix-recreate-op-records-if-deleted (2026-10-28)
https://github.com/cli/cli/releases/latest
gh auth status
github.com
✓ Logged in to github.com account ilya_xxxxxx (1password)
Key points
I work with it only on MAC, but as GH owner in my company the idea is all users will use it in the company
And even it will be the default option for all users
Authorship and follow-up
Who wrote this:
Who answers review comments: