Add a git credential
Stores an HTTPS access token (kind token) or an SSH private key (kind ssh_key) for a git host, sealed. To have the panel make the key pair instead, use git.generateSshKey.
Needs git.manage, which owners and admins hold. Not available to MCP clients or the assistant.
seylo_session<token>application/json- body
name*string1 <= length <= 60kind*string|stringhost*stringHost the credential is for, for example "gitlab.com" or "git.example.com:2222".
^[A-Za-z0-9.-]+(:[0-9]{1,5})?$1 <= length <= 253username?stringlength <= 100token?string1 <= length <= 1000privateKey?string^-----BEGIN [A-Z ]*PRIVATE KEY-----1 <= length <= 20000knownHosts?stringknown_hosts lines; empty uses the built-in keys of well-known hosts.
length <= 20000Success.
application/json- response
id*stringPanel-issued id.
^[a-z0-9]{16}$name*string1 <= length <= 60kind*string|stringhost*stringHost the credential is for, for example "gitlab.com" or "git.example.com:2222".
^[A-Za-z0-9.-]+(:[0-9]{1,5})?$1 <= length <= 253username*string|nullpublicKey*string|nullfingerprint*string|nullknownHosts*stringorigin*string|string|stringusedBy*integer0 <= valuecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://example.com/api/v1/git.createCredential' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "kind": "token", "host": "string"}'{ "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"}List a git repository's branches GET
Checks access to a git URL (with a stored credential for private repos, like git ls-remote) and lists its branches with the default one. Used to validate a generic git source before saving it. Needs `services.create` on the project. Available to MCP clients and the assistant.
Delete a git credential POST
Deletes a git credential. Fails while a service's source still uses it. Needs `git.manage`, which owners and admins hold. Available to MCP clients and the assistant, after a person approves the call.