Jfrog propagate GPG Signing keys for Distribution

157 views Asked by At

I have to sign the release bundles I created under distribution. I generated gpg as in the jfrog document [1] and uploaded it both with the interface and with the rest API [2] but when I want to sign my release bundle, I can't see the signing key I created.

  1. https://jfrog.com/help/r/jfrog-distribution-documentation/gpg-signing
  2. https://jfrog.com/help/r/jfrog-rest-apis/upload-and-propagate-gpg-signing-keys-for-distribution
1

There are 1 answers

0
Yevdo Abramov On

Here are two CURL examples you should use {{jfrog_platform_url}} - your jfrog url {{token}} - and admin token for your environment

Set the GPG key

curl -X POST
'https://{{jfrog_platform_url}}/distribution/api/v1/keys/pgp' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
    "set_as_default": true,
    "key": {
        "alias": "TheKEY",
        "public_key": "{{public_GPG_key}}",
        "private_key": "{{private_GPG_key}}"
    }
}'

Propagate it

curl -X POST 'https://{{jfrog_platform_url}}/distribution/api/v1/keys/pgp/propagate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}'