corestack_ deployments_ repository_ set
Connect a repository.
When to use it
Connect a row to a repository and branch through one of the company's Git connections, and choose whether a push deploys it automatically.
On a WordPress site, contents says what the repository holds: whole_site (the default) builds each release from the repository; site_content (part of the site, such as themes and must-use plugins) copies the live site into each new release and replaces only the top-level folders the repository contains, under target_path (wp-content, or web/app on Bedrock, when it is null). Leave either out to keep what the repository has; root_directory does not apply to site content. corestack_deployments_get answers repository_options: whether site content can be chosen on this row and what a new connection starts from.
Ask for it
Using the Corefinity MCP server, call corestack_deployments_repository_set with site_id 4211, connection_id 12, repo corefinity/example-shop, branch main, auto_deploy false. (Connect a repository.) Tell me what it returned.Inputs
Up to 255 characters.
At least 1.
What the repository holds; omitted keeps the current choice.
whole_sitesite_contentUp to 255 characters.
The directory inside the repository to deploy; empty for the root. Up to 255 characters.
At least 1.
Site content only: where its folders go, relative to the site root; null for the default; omitted keeps it. Up to 255 characters.
Example call
{
"name": "corestack_deployments_repository_set",
"arguments": {
"site_id": 4211,
"connection_id": 12,
"repo": "corefinity/example-shop",
"branch": "main",
"auto_deploy": false
}
}If it is refused
| Reason | What to do |
|---|---|
managed_elsewhere | Another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done. |
invalid_arguments | With fields.contents: site content on a site that is not WordPress ("Site content repositories are available for WordPress sites only."), or while Corefinity has paused it; with fields.target_path: a target path that is not a folder inside the site, or one kept between deployments, such as wp-content/uploads. Nothing was saved. |
forbidden | The person's role lacks the Manage Deployment Repositories permission, or auto_deploy would switch automatic deployment on or off and it lacks the Manage Deployment Source permission, or automatic deployment stays or turns on and it lacks the Create Deployments permission (a push that deploys on its own is a deployment, and the repository set here is what the next push deploys). The message names the permission and says an owner of the company can grant it in Roles; details.permission is manageDeploymentRepositories, manageDeploymentSource or createDeployments. Nothing is changed. Sent as it already is, auto_deploy is no change; it is on only when both the environment and its deployments say so. Without Create Deployments, change the repository with auto_deploy false (which needs Manage Deployment Source while it is on); without either, only while automatic deployment is off in both. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |