CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 64 of 65

corestack_environment_registry_secret_set

Set a CoreStack Enterprise registry credential.

Scope writeNo secrets returned
On this page

When to use it

Add a Composer registry credential to a CoreStack Enterprise environment, so its builds can install packages from a private registry, or change one: the environment page's "Composer registries" card's Save. Without secret_id it adds one (label, registry, auth_type, secret, and username for http-basic); with secret_id it changes only what you send. A change of host, auth type, username or secret clears the credential's verification.

Saved credentials are used by the environment's builds on build pipeline version 2, and only once Composer registry credentials are switched on for that environment; until then they are kept, and builds do not receive them. They are given to a build for that build only and removed after it.

A host the project's own auth.json also signs in to: Composer 2.10 and later use the saved credential for it, older Composer versions the project's. One in COMPOSER_HOME's auth.json: the saved credential. The build log says when either happens.

Send verify: true to ask the registry once, after saving, whether it accepts the credentials (verified and message in the answer). secret_id with verify: true and nothing else verifies a saved credential. The registry is asked over HTTPS only, at a public address, and a redirect is reported, never followed.

The username and the secret are write-only: never answered and never kept in the MCP audit. Never ask the person to paste a secret into the chat; they can also add it on the card.

This is for CoreStack Enterprise environments only. A CoreStack or CoreCluster site uses corestack_deployments_secret_set, by site_id.

The public API does the same with the same checks, refusals and scope: POST and PUT /api/corestack/environments/{environment}/deploy-secrets[/{secret}], and POST …/{secret}/verify.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_environment_registry_secret_set with enterprise_env_id 1530, label Private packages, registry repo.example.com, auth_type http-basic, username <the registry username>, secret <the registry password or token>, verify true. (Set a CoreStack Enterprise registry credential.) Tell me what it returned.

Inputs

auth_typestring
http-basicbearergithub-oauthgitlab-token
enterprise_env_idintegerRequired

A CoreStack Enterprise environment's id; for a CoreStack or CoreCluster site use corestack_deployments_secrets_list by site_id. At least 1.

labelstring

A name for it, up to 255 characters.

registrystring

The registry's host, with a port if it needs one; no scheme or path.

secretstring

The password or token. Write-only.

secret_idinteger

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

usernamestring

Http-basic only. Write-only.

verifyboolean

After saving, ask the registry once whether it accepts these credentials.

Example call

tools/call
{
  "name": "corestack_environment_registry_secret_set",
  "arguments": {
    "enterprise_env_id": 1530,
    "label": "Private packages",
    "registry": "repo.example.com",
    "auth_type": "http-basic",
    "username": "<the registry username>",
    "secret": "<the registry password or token>",
    "verify": true
  }
}

If it is refused

ReasonWhat to do
existsA credential for that host is already saved; change it with its secret_id (in details.id).
secret_invalidA value is not valid (the host, the auth type, the secret's characters, a missing username for http-basic), the registry's address is not public, the environment already holds the most credentials it can, or its credentials together would be too large for a build; the message says which.
invalid_argumentssecret_id with nothing to change and no verify: true. Also (field enterprise_env_id) a CoreStack or CoreCluster environment; use corestack_deployments_secret_set by site_id.
forbiddenThe person's role lacks the Edit Environment Deployment Pipeline permission. The message names it and says an owner of the company can grant it in Roles; details.permission is editEnvironmentDeploymentPipeline. Nothing is changed.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
secret_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.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
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