Checkout a git repository
POST/source-svc/repo/checkout
Checkout a git repository over https or ssh at a specific version into a temporary directory. Performs a shallow clone with minimal history for faster checkout.
Request
- application/json
Body
required
Checkout Repo Request
password string
Password or token for HTTPS auth
ssh_key string
SSH private key (optional for SSH connection)
ssh_key_pwd string
Password for SSH private key if encrypted (optional)
url string
Full repository URL (e.g., https://github.com/user/repo)
username string
Username for HTTPS or SSH user (optional for SSH)
version string
Branch, tag, or commit SHA
Responses
- 200
- 400
- 401
- 500
Successfully checked out the repository
- application/json
- Schema
- Example (from schema)
Schema
dir string
Directory where the repository was checked out
{
"dir": "string"
}
Invalid JSON
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
error string
{
"error": "string"
}
Loading...