Skip to Content
SeyloDocs
API referenceGit credentials

Change a git credential

POST
/api/v1/git.updateCredential

Renames a credential, or replaces its user name, secret or known_hosts. Omitted fields keep their value; the kind cannot change.

Needs git.manage, which owners and admins hold. Not available to MCP clients or the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
credentialId*string

Panel-issued id.

Match^[a-z0-9]{16}$
name?string
Length1 <= length <= 60
username?|null
token?string
Length1 <= length <= 1000
privateKey?string
Match^-----BEGIN [A-Z ]*PRIVATE KEY-----
Length1 <= length <= 20000
knownHosts?string

known_hosts lines; empty uses the built-in keys of well-known hosts.

Lengthlength <= 20000

Response Body

Success.

application/json
  1. response
id*string

Panel-issued id.

Match^[a-z0-9]{16}$
name*string
Length1 <= length <= 60
kind*string|string
host*string

Host the credential is for, for example "gitlab.com" or "git.example.com:2222".

Match^[A-Za-z0-9.-]+(:[0-9]{1,5})?$
Length1 <= length <= 253
username*string|null
publicKey*string|null
fingerprint*string|null
knownHosts*string
origin*string|string|string
usedBy*integer
Range0 <= value
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/git.updateCredential' \  -H 'Content-Type: application/json' \  -d '{  "credentialId": "string"}'
Example Response
{  "id": "string",  "name": "string",  "kind": "token",  "host": "string",  "username": "string",  "publicKey": "string",  "fingerprint": "string",  "knownHosts": "string",  "origin": "manual",  "usedBy": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}