Configure the pypi client to use Repsy
Configure the pypi client to use a Repsy repository.
rp edits the client’s own configuration file; it never replaces it. Every file that would change is shown as a diff first, you confirm each write (–yes skips the question), and the original is kept next to it as a timestamped backup. A second run changes nothing.
–scope selects what is written. The default is user (your home directory). pypi supports: user (.pypirc). An unsupported scope is an error; rp never writes somewhere else instead.
The token is NOT written to the file by default. This client cannot read the token from the environment in its file, so setup needs –embed-token. –embed-token writes the plain token instead; the file then holds a secret, and rp warns about it. Use it only when the client cannot read the environment.
With –repo, rp first checks that the repository exists (one request, also with –dry-run and –print) and stops with an error before it writes anything when it does not.
–dry-run shows the diff and writes nothing; –print shows the complete new file (secrets redacted) and writes nothing. Neither runs a command.
If you answer no to a question, that change is skipped and rp still exits 0; the messages on stderr say what was not done.
rp pypi setup [flags]
Options
--dry-run Show the diff and write nothing
--embed-token Write the plain token into the file instead of an environment variable reference (unsafe: the file then holds a secret)
--print Print the complete new file content (secrets redacted) and write nothing
--repo string Repository to configure the client for
--scope string Where to write: user (your home directory) or project (the working directory) (default "user")
Options inherited from parent commands
--api-url string Panel API URL of the profile, overrides the stored value
--ca-file string PEM file with extra trusted CA certificates
--debug Print debug output with secrets redacted
--hostname string Repsy host to use instead of the current profile
--insecure Do not verify TLS certificates (unsafe; plain http is chosen with the URL, not with this flag)
--insecure-storage Keep credentials in a plain 0600 file instead of the OS keyring (unsafe; a warning is printed once per command)
--jq string Filter JSON output with a jq expression (implies --output json)
--no-color Disable colored output
--no-input Never prompt; fail when input is needed
--output table|json|yaml Output format: table, json or yaml (default table; json when --jq is given)
--owner string Owner segment of Cloud protocol URLs; --owner= means none
--registry-url string Protocol host URL of the profile, overrides the stored value
--type os|cloud Product of the host, overrides detection
--web-url string Panel UI URL of the profile (where /cli/auth lives), overrides the stored value
--yes Answer yes to confirmation prompts
See also
- rp pypi - Work with pypi repositories