Skip to content

docs: Document registry create password stdin and interactive prompt - #813

Open
promptless[bot] wants to merge 3 commits into
mainfrom
promptless/runpodctl-registry-password-stdin
Open

docs: Document registry create password stdin and interactive prompt#813
promptless[bot] wants to merge 3 commits into
mainfrom
promptless/runpodctl-registry-password-stdin

Conversation

@promptless

@promptless promptless Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Open in Promptless

The runpodctl registry create reference page now documents all three ways to supply a registry password. The command previously accepted the secret only through the required --password flag, which exposed it in the process table and shell history. It now also reads the password from standard input with the new --password-stdin flag (via a pipe, heredoc, or file redirection) and, when no password flag is given in an interactive terminal, prompts for it without echoing.

The "Create a registry authentication" section adds worked examples for each method, including the Google Artifact Registry / gcr.io _json_key workflow that feeds a multi-line service-account JSON key through --password-stdin, plus a tip recommending the stdin or prompt methods over --password. The "Create flags" block marks --password as optional (it was required), documents that --password and --password-stdin are mutually exclusive, and adds the new --password-stdin flag.

Trigger Events


Tip: Add or adjust Promptless's style guide in Agent Knowledge Base ✍️

Reflect runpodctl PR #329: --password-stdin, interactive no-echo prompt,
--password now optional, mutual exclusivity, and multi-line _json_key support.
### Create a registry authentication

Create credentials for a private container registry:
Create credentials for a private container registry. Supply the password with the `--password` flag, by piping or redirecting it into `--password-stdin`, or by omitting both flags to enter it at an interactive prompt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolvePassword switch statement establishes the three password sources: --password flag, --password-stdin, and an interactive prompt when neither is given (and stdin is a terminal); merged in runpod/runpodctl PR #329.

Source: https://github.com/runpod/runpodctl/blob/0592468b1f1f02d8ca10485af56192ebf9a84d05/cmd/registry/create.go#L120-L156

runpodctl registry create --name "docker-hub" --username "myuser" --password "mypassword"
```

Omit the password flag to have the command prompt for the password without echoing it:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

promptPassword uses term.ReadPassword, which disables terminal echo, confirming the interactive prompt does not echo input; triggered only when stdinIsTerminal() (line 141).

Source: https://github.com/runpod/runpodctl/blob/0592468b1f1f02d8ca10485af56192ebf9a84d05/cmd/registry/create.go#L92-L100

@mintlify

mintlify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
runpod-docs 🟢 Ready View Preview Aug 24, 2026, 8:26 PM

Pipe a token held in an environment variable into `--password-stdin`:

```bash
printenv REGISTRY_TOKEN | runpodctl registry create --name "docker-hub" --username "myuser" --password-stdin

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cobra Example field for registry create shows the pipe (printenv | ... --password-stdin) and file-redirection (--password-stdin < token.txt) invocation forms matched by the docs examples.

Source: https://github.com/runpod/runpodctl/blob/0592468b1f1f02d8ca10485af56192ebf9a84d05/cmd/registry/create.go#L27-L34

runpodctl registry create --name "docker-hub" --username "myuser" --password-stdin < token.txt
```

For Google Artifact Registry or gcr.io, set `--username` to the literal `_json_key` and feed the multi-line service-account JSON key file through `--password-stdin`. The command supports multi-line passwords and strips only a single trailing newline added by the pipe or redirection.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TrimSuffix(TrimSuffix(data, "\n"), "\r") strips only a single trailing newline (\n or \r\n) added by a pipe/redirection, preserving multi-line content such as a gcr.io _json_key service-account JSON key.

Source: https://github.com/runpod/runpodctl/blob/0592468b1f1f02d8ca10485af56192ebf9a84d05/cmd/registry/create.go#L127-L134


<ResponseField name="--password" type="string" required>
Registry password or access token.
<ResponseField name="--password" type="string">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init() marks only --name and --username required via MarkFlagRequired; --password-stdin is a BoolVar (no value); MarkFlagsMutuallyExclusive("password", "password-stdin") makes the two password flags mutually exclusive.

Source: https://github.com/runpod/runpodctl/blob/0592468b1f1f02d8ca10485af56192ebf9a84d05/cmd/registry/create.go#L47-L57

@lavanya-gunreddi

Copy link
Copy Markdown
Contributor

@Promptless When a sentence presents three or more parallel options, alternatives, or steps, use a bulleted list instead. Never chain them with commas and "or".

@promptless

promptless Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Got it — thanks for the guidance. I'll record this as a style rule (three or more parallel options, alternatives, or steps become a bulleted list rather than a comma-and-"or" chain) so it's applied going forward, and I'll review this PR's content for any sentences to convert. I'll follow up here shortly.

@promptless

promptless Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Update: I've recorded the style rule and reviewed this PR. The registry reference page has a couple of sentences that chain three parallel options with commas and "or" — I'm converting those to bulleted lists now and will update the PR shortly.

@promptless

promptless Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the guidance, @lavanya-gunreddi — we've saved this as a standing style rule so Promptless follows it going forward: three or more parallel options, alternatives, or steps get a bulleted list rather than a comma-and-"or" chain (two items may stay inline). It's recorded in your Knowledge Base in PROMPTLESS.md.

We also applied it to this PR: the "Create a registry authentication" intro, which previously chained the three ways to supply a password with commas and "or", is now a three-item bulleted list. We reviewed the rest of the page and found no other sentences chaining three or more options this way — the remaining "X or Y" phrasings are two-item, which the rule allows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant