GH-GPG-KEY-ADD(1)

πŸŽ€ GH-GPG-KEY-ADD(1) β€” the GitHub CLI manual, bestie edition πŸŽ€

okay so real quick, this is a page from the GitHub CLI manual, and it's literally all about adding a GPG key to your GitHub account. yes. that's the whole vibe. let's go πŸ’…


✨ NAME ✨

gh-gpg-key-add β€” add a GPG key to your GitHub account πŸ”‘

like, it takes your key and puts it on your account. iconic behavior, no cap.


🌸 SYNOPSIS 🌸

gh gpg-key add [<key-file>] [flags]

so you run gh gpg-key add, you optionally hand it key-file, and you can sprinkle flags on top. that's the whole thing 🫢


πŸ’– OPTIONS πŸ’–

  • -t, --title <string> β€” the title for the new key. give it a name, bestie, so future-you knows what it is 🏷️

⭐ EXIT CODES ⭐

okay so when the command finishes, the exit code tells you the tea β˜• here's the whole menu:

  • 0 β€” successful execution! slay, it worked πŸ’š
  • 1 β€” error 😭 something went wrong
  • 2 β€” command canceled πŸ™ˆ you (or something) backed out
  • 4 β€” authentication required πŸ” like, log in first, bestie
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. fr fr, always check the specific command's own help πŸ‘€

πŸ¦‹ SEE ALSO πŸ¦‹

  • gh-gpg-key(1) β€” the parent command, go check it out 🧚

and that's the page!! πŸ’œ this was written for GitHub CLI v2.102.0, dated Oct 2026 β€” so if you're reading this from the future, hi, you're gorgeous, and please check if things changed πŸŽ€βœ¨

πŸ“¦ where this page comes from