This repository has been archived on 2026-11-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
vault-plugin-secrets-gpg/docs/export.md
T
unkin-agent 873069c6bd
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Add MIT license, rewrite README and add path reference docs
2026-11-16 23:12:28 +11:00

913 B

Export

GET /gpg/export/:type/:name(/:version)

Returns armored key material. public-key can always be exported, and is what gpg or pass imports to encrypt to the key. private-key works only if the key is exportable.

Parameter Type Description
type string public-key or private-key.
name string Name of the key.
version int Version to export. 0 means the latest version. Leave it out to export every version.

The response has name, type and keys. keys maps each version number to its armored key.

# all public versions
vault read gpg/export/public-key/app

# latest public key, ready for gpg
vault read -format=json gpg/export/public-key/app/0 \
  | jq -r '.data.keys | to_entries[0].value' | gpg --import

# private key of version 1 (key must be exportable)
vault read gpg/export/private-key/app/1