The Wayback Machine - https://web.archive.org/web/20210907032221/https://github.com/cli/cli/pull/3822
Skip to content
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: add GPG key management commands #3822

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

@owenvoke
Copy link

@owenvoke owenvoke commented Jun 11, 2021

This adds two new subcommands (gpg-key list and gpg-key add) based off of the ssh-key subcommands. I've never worked with Go before, so hope this is correct.

Related to #1755 (comment)

$ gh gpg-key add ~/gpg_key.asc
✓ GPG public key added to your account

$ gh gpg-key
Manage GPG keys registered with your GitHub account

USAGE
  gh gpg-key <command> [flags]

CORE COMMANDS
  add:        Add a GPG key to your GitHub account
  list:       Lists GPG keys in your GitHub account

Currently gh gpg-key list will show the output using the following columns:

  • GPG key ID
  • Expiry date
  • Public key ID (truncated in the middle if necessary)

I wasn't sure whether to included the date it was uploaded, or anything else as it seemed to get a bit cluttered.


I've temporarily created a GitHub CLI extension for this, however I'd much rather it be in core. 👍🏻

@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
The GitHub CLI
  
Needs review 🤔
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants