pks registry remove

stable

Delete a container registry's stored credentials from a runner host so job containers can no longer authenticate to that registry from this machine.

Author: Poul Kjeldager
Usage: pks registry remove <hostname>
Category: infrastructure

Examples

$ pks registry remove registry.kjeldager.io

Delete stored credentials for one registry

Revoke a registry registration from a runner host. After removal, the runner's credential server has nothing to serve for that hostname, so any CI job on this host that needs to push or pull from it fails until the registry is registered again.

1. Prerequisites

  • The exact hostname. Run pks registry status first and copy the hostname from the table. This command takes no interactive prompt and no fuzzy match.
  • Awareness of what depends on it. Every job that lands on this host loses access at once, including jobs already queued.

2. Confirm what you are about to delete

pks registry status registry.kjeldager.io

A row confirms the entry exists and shows the username it was registered with.

3. Remove the registration

pks registry remove registry.kjeldager.io

The entry is deleted from ~/.pks-cli/registries.json immediately. There is no confirmation prompt and no undo. If the hostname is not registered, the command prints an error and exits with code 1.

4. Verify

pks registry status

The hostname is gone from the table. The runner's credential server reads the store live on every request, so the change applies to the next credential request without restarting the runner daemon. Requests already served keep the credential they were given.

5. Next steps

Arguments

ArgumentRequiredDescription
<hostname>yesRegistry hostname to remove. Omitting it prints Hostname is required. and exits with code 1.

There are no flags on this command.

Troubleshooting

Hostname is required. Unlike pks registry init, this command has no interactive fallback. Pass the hostname on the command line. The argument is declared as optional at the parsing level and enforced inside the command itself, which is why the error is a message rather than a usage error.

The hostname is reported as not registered. Match the string exactly as pks registry status prints it. Entries are stored normalized, with no scheme and no trailing slash.

Rotating a credential. Removal is not needed. Run pks registry init for the same hostname — it overwrites the existing entry.

Removing did not stop an in-flight job. The credential server re-queries the store per request, so removal only affects requests made after it. A job container that already holds the credential keeps working until it exits.

See also