GT-GPG-KEY-CREATE(1) gitea-cli Manual GT-GPG-KEY-CREATE(1)

gt-gpg-key-create - Add a GPG public key from a file or stdin

gt gpg-key create [<file>] [flags]

Add an ASCII-armored GPG public key to your account. Without a file, or with -, the key is read from stdin. Export it with gpg --armor --export KEYID.

Gitea refuses a key that names no activated email address of your account, unless --signature-file gives a signature of what gt gpg-key token prints. It then stores the key as verified.

can_certify, can_encrypt_comms, can_encrypt_storage, can_sign, created_at,
emails, expires_at, id, key_id, primary_key_id, public_key, subkeys, verified

--dry-run[=false] Show the write requests gt would send, without sending them

-h, --help[=false] help for create

--signature-file="" Read a signature of the token from file, or - for stdin, for a key without an activated email address

--csv[=""] Output CSV with the specified comma-separated fields, or all fields

--debug[=false] Log the method, URL, status, and duration of each HTTP request to stderr

--host="" Gitea instance URL, including any base path

--interactive[=false] Allow prompts with machine output

-q, --jq="" Filter JSON output using a jq expression; implies --json

--json[=""] Output JSON with the specified comma-separated fields, or all fields

--no-input[=false] Disable prompts and implicit editor/browser interactions

--sudo="" Perform API requests as this user (requires an administrator account)

--template="" Format JSON output using a Go template; implies --json (see gt help formatting)

--user="" Account name on the selected instance

$ gpg --armor --export 3AA5C34371567BD2 | gt gpg-key create
$ gt gpg-key create public.asc
$ gt gpg-key token | gpg --armor --detach-sign --default-key 3AA5C34371567BD2 > token.asc
$ gt gpg-key create public.asc --signature-file token.asc

gt-gpg-key(1)

Nov 2026 gitea-cli