CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 48 of 65

corestack_enterprise_repository_set

Set a CoreStack Enterprise repository.

Scope writeNo secrets returned
On this page

When to use it

Add a git repository and branch to a CoreStack Enterprise environment, or change one (repository_id): the Repositories field's Save. The environment must deploy from git (corestack_enterprise_deployment_settings_update). Every field is checked together and nothing is saved until all pass. The answer is the repository's row as corestack_enterprise_repositories_list lists it.

The public API's POST /api/environments/{environment}/repositories and PATCH .../repositories/{repository} do the same.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_enterprise_repository_set with enterprise_env_id 1530, connection_id 412, pipeline_id 2210, repo example-org/storefront, branch main, root_directory /. (Set a CoreStack Enterprise repository.) Tell me what it returned.

Inputs

branchstringRequired

Up to 255 characters.

connection_idintegerRequired

A git account from corestack_enterprise_repositories_list connections. At least 1.

enterprise_env_idintegerRequired

A CoreStack Enterprise environment's id; for CoreStack or CoreCluster use the corestack_deployment_* tools. At least 1.

pipeline_idintegerRequired

The environment's pipeline the repository deploys with. At least 1.

repostringRequired

owner/name as the provider names it. Up to 255 characters.

repository_idinteger

Change this repository; leave out to add one. At least 1.

root_directorystringRequired

/ for the repository root. Up to 255 characters.

Example call

tools/call
{
  "name": "corestack_enterprise_repository_set",
  "arguments": {
    "enterprise_env_id": 1530,
    "connection_id": 412,
    "pipeline_id": 2210,
    "repo": "example-org/storefront",
    "branch": "main",
    "root_directory": "/"
  }
}

If it is refused

ReasonWhat to do
invalid_argumentsA field is wrong (the pipeline is not the environment's, the repository path, branch or root directory grammar), or connection_id names no git account the person may use here ("The selected git account could not be found.").
forbiddenThe person's role lacks the Manage Deployment Repositories permission, or the environment's pushes deploy on their own (deployment_source git with git_deploys automatic) and it lacks the Create Deployments permission: 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 or createDeployments. Nothing is changed. With git_deploys manual nothing more is asked. Also forbidden: the repository was set up with a git account the person cannot use.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
repository_idSee how this server works.
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.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
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