Skip to content

Probe the configured Git Sync remote without saving.

POST
/git/test-connection

Performs an ls-remote against the supplied remote with the supplied credentials and reports whether auth succeeded and whether the branch exists. Always returns 200 with a structured body; failures are classified via the code field rather than via HTTP status.

If https_token is omitted (null), the currently stored token (if any) is used. Pass an empty string to probe with no token.

object
remote
required
string
branch
string
default: main
ssh_key_path
string
https_username
string
https_token

Null = use stored token; "" = no token; non-empty = use this token.

string
nullable

Probe completed (success or classified failure).

object
ok
required
boolean
code
required
string
Allowed values: ok auth_failed not_found branch_missing network unknown
message
required
string
branch_found
required
boolean
raw_error
required
string

Invalid request body.

Unauthenticated.

Not a super-admin.