CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 5 of 65

corestack_deployments_repository_set

Connect a repository.

Scope writeNo secrets returnedCoreCluster
On this page

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

Prompt
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

auto_deploybooleanRequired
branchstringRequired

Up to 255 characters.

connection_idintegerRequired

At least 1.

contentsstring

What the repository holds; omitted keeps the current choice.

whole_sitesite_content
repostringRequired

Up to 255 characters.

root_directorystring or null

The directory inside the repository to deploy; empty for the root. Up to 255 characters.

site_idintegerRequired

At least 1.

target_pathstring or null

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

tools/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

ReasonWhat to do
managed_elsewhereAnother 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_argumentsWith 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.
forbiddenThe 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_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe 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_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT