corestack_ environment_ registry_ secret_ set
Set a CoreStack Enterprise registry credential.
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
/, and POST …/{secret}/verify.
Ask for it
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
http-basicbearergithub-oauthgitlab-tokenA CoreStack Enterprise environment's id; for a CoreStack or CoreCluster site use corestack_deployments_secrets_list by site_id. At least 1.
A name for it, up to 255 characters.
The registry's host, with a port if it needs one; no scheme or path.
The password or token. Write-only.
Change this credential; leave out to add one. At least 1.
Http-basic only. Write-only.
After saving, ask the registry once whether it accepts these credentials.
Example 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
| Reason | What to do |
|---|---|
exists | A credential for that host is already saved; change it with its secret_id (in details.id). |
secret_invalid | A 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_arguments | secret_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. |
forbidden | The 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_mismatch | The object does not exist or the token may not see it. Check the id. |
secret_id | See how this server works. |
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. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
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. |