Store container-registry credentials on a self-hosted runner host so CI job containers can authenticate to a private registry without secrets in workflow YAML.
pks registry <command> [hostname]$ pks registry init registry.kjeldager.ioRegister a private registry on this runner host
$ pks registry statusList every registry registered on this host
$ pks registry status registry.kjeldager.ioShow the stored entry for one hostname
$ pks registry remove registry.kjeldager.ioDelete stored credentials for one registry
pks registry manages container-registry credentials on the machine that runs a self-hosted runner. It exists so a CI job container spawned by the runner can docker login against a private registry without the username and password ever appearing in workflow YAML, in the repository, or in a GitHub Actions secret.
pks registry is a three-command branch that writes a hostname, username, and password into ~/.pks-cli/registries.json on the runner host. The runner daemon reads that store at job time and hands the matching credential to the job container over an authenticated local socket.
pks registry init calls the local docker login to prove the credentials work before storing them.pks registry init instead of failing halfway through a CI push.GET /registry/credential?hostname=... so in-container tooling fetches {username, password} on demand.pks registry status prints what is registered, by whom, and when.The store is written by pks registry init and read by the credential server that pks runner start constructs when the runner daemon boots. When a CI job needs to push an image, the tooling inside the job container asks the credential server for the hostname it is pushing to, gets the username and password back, and logs in. The secret never leaves the runner host's filesystem and the job container's memory.
Registrations are matched on hostname, case-insensitively. pks registry init normalizes the hostname it is given — it strips a leading https:// or http:// and any trailing slash — so https://registry.kjeldager.io/ and registry.kjeldager.io are the same entry.
pks registry init on the host, Docker verifies the credential, pks writes ~/.pks-cli/registries.json.init · status · remove
There is no default command on this branch, so a bare pks registry prints the subcommand list. All three subcommands take the same single positional argument, [hostname], and no flags at all.
| Command | What it does |
|---|---|
pks registry init | Prompt for a username and masked password, verify with docker login, and store the credential. |
pks registry status | List every registered registry, or show the detail row for one hostname. |
pks registry remove | Delete a hostname's stored credential from this host. |
| Setting | Value |
|---|---|
| Credential store path | ~/.pks-cli/registries.json |
| Password storage | Plaintext JSON |
| Hostname matching | Case-insensitive |
| Credential endpoint | GET /registry/credential?hostname=... |
No environment variable overrides the store path — the location is fixed on every operating system. On Windows it resolves to C:\Users\<user>\.pks-cli\registries.json.
Note. The password is stored in plaintext. Treat
~/.pks-cli/registries.jsonas a secret file and protect it with filesystem permissions.
Register a private container registry on a runner host: enter a hostname, username, and password, have Docker verify them, and persist the credential for CI.
pks registry init [hostname]
Complete argument, exit-code, storage-format, and credential-server reference for the pks registry branch — init, status, and remove.
pks registry <command> [hostname]
Delete a container registry's stored credentials from a runner host so job containers can no longer authenticate to that registry from this machine.
pks registry remove <hostname>
List the container registries registered on a runner host, or inspect a single hostname, reading the local credential store without any network call.
pks registry status [hostname]