跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 22.6.1, which is no longer the latest release. See the latest release.

List the given user's GPG keys

GET
/users/{username}/gpg_keys
curl --request GET \
--url https://gitea.example.com/api/v1/users/example/gpg_keys \
--header 'Authorization: Basic <credentials>'
username
required
string

Username of user

page
integer

Page number of results to return (1-based)

limit
integer

Page size of results

GPGKeyList

Media typeapplication/json
Array<object>

GPGKey a user GPG key to sign commit and tag in repository

object
can_certify
boolean
can_encrypt_comms
boolean
can_encrypt_storage
boolean
can_sign
boolean
created_at
string format: date-time
emails
Array<object>

GPGKeyEmail an email attached to a GPGKey

object
email
string
verified
boolean
expires_at
string format: date-time
id
integer format: int64
key_id
string
primary_key_id
string
public_key
string
subkeys
Array<object> recursive
verified
boolean
Examplegenerated
[
{
"can_certify": true,
"can_encrypt_comms": true,
"can_encrypt_storage": true,
"can_sign": true,
"created_at": "2026-04-15T12:00:00Z",
"emails": [
{
"email": "example",
"verified": true
}
],
"expires_at": "2026-04-15T12:00:00Z",
"id": 1,
"key_id": "example",
"primary_key_id": "example",
"public_key": "example",
"subkeys": [],
"verified": true
}
]

APINotFound is a not found empty response

Media typeapplication/json