-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
authrelated to tokens, authentication state, or oauthrelated to tokens, authentication state, or oauthenhancementa request to improve CLIa request to improve CLIgh-authrelating to the gh auth commandrelating to the gh auth commandhelp wantedContributions welcomeContributions welcome
Description
Describe the feature or problem you’d like to solve
When I use gh auth login to login with the GitHub CLI OAuth app, I have to manually select and copy the one-time device code before launching the browser so I can paste it into the GitHub.com device login screen.
! First copy your one-time code: 7701-C5F6
Press Enter to open https://github.com/login/device in your browser...
I'd like some way I can configure gh to use the clipboard for certain features like gh auth login.
Proposed solution
I can see 3 different ways to provide this ability depending on how broadly this capability might be extended:
- Environment variable:
GH_CLIPBOARD=1 - Configuration setting:
gh config set clipboard enabled - Command-specific flag:
gh auth login --clipboard
Additional context
One of gh dependencies is already including a library for putting content into the system's copy buffer:
Line 73 in 42a8e02
| github.com/atotto/clipboard v0.1.4 // indirect |
BagToad, RyanHecht, BlakeLReeves and ankddevRyanHecht
Metadata
Metadata
Assignees
Labels
authrelated to tokens, authentication state, or oauthrelated to tokens, authentication state, or oauthenhancementa request to improve CLIa request to improve CLIgh-authrelating to the gh auth commandrelating to the gh auth commandhelp wantedContributions welcomeContributions welcome