user

Create a GPG key

Changed on
post/user/gpg_keys

Request

  • Base URL
    https://demo.gitea.com/api/v1
  • Auth
    • HTTP basic
    • or API key in query parameter token
    • or API key in query parameter access_token
    • or API key in header Authorization
    • or API key in query parameter sudo
    • or API key in header Sudo
    • or API key in header X-GITEA-OTP
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Request body

armored_public_keystring required

An armored GPG key to add

armored_signaturestring

An optional armored signature for the GPG key

Response

GPGKey

can_certifyboolean

Whether the key can be used for certification

can_encrypt_commsboolean

Whether the key can be used for encrypting communications

can_encrypt_storageboolean

Whether the key can be used for encrypting storage

can_signboolean

Whether the key can be used for signing

created_atstring date-time

The date and time when the GPG key was created

expires_atstring date-time

The date and time when the GPG key expires

idinteger

The unique identifier of the GPG key

key_idstring

The key ID of the GPG key

primary_key_idstring

The primary key ID of the GPG key

public_keystring

The public key content in armored format

subkeysGPGKey[] circular
verifiedboolean

Whether the GPG key has been verified

Changes

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status