create registry pypi

Create a new pypi registry

Synopsis

Create

This command will create a PyPi registry reference in torero's data store. torero supports creating registries that point to any PyPi registry for use with your Python and Ansible services.

By default, torero will have a single PyPi registry reference called default-pypi that points to the public PyPi registry located at https://pypi.org/simple. A new default registry can be set by specifying the --default flag.

We can specify the URL of the registry we want to create using the --url flag. You can get the URL of the registry you want to use from your PyPi instance's UI under:

Collections > Repository Management.

Many flags are available to specify the type of authentication required to access the registry. By default, no authentication used by torero.

The --username and --password-name flags can be used to specify basic authentication. The --token-name flag can be used to specify token authentication. The --password-name and --token-name flags are references to the names of secret resources that contain the actual password or token value. See the 'Handling Secret Values' section displayed when torero create registry -h is run for more information on using secrets with registries.

To ignore SSL certificate verification, specify the --insecure flag. This causes the --trusted-host flag to be set to the registry's hostname during dependency installation.

torero create registry pypi <name> --url <string> [flags]

Examples

Create A PyPi Registry That Requires Basic Authentication

Creates a registry called my-pypi-registry that requires a username and password to authenticate. The username is admin and the password is a reference to a secret called pip_password.

>_ torero create registry pypi my-pypi-registry \
--url 'http://private-repo-hostname:8080/simple' \
--username admin \
--password-name pip_password

Create A PyPi Registry That Requires Token Authentication

Creates a registry called my-pypi-registry that requires a token authenticate. The token value is a reference to a secret called pip_token.

>_ torero create registry pypi my-pypi-registry \
--url 'http://private-repo-hostname:8080/simple' \
--token-name pip_token

Options

      --default                Whether or not this registry will be used by default if no registry is specified
                               on a service. Only one default can exist at a time.
      --description string     A brief description of the registry
  -h, --help                   help for pypi
      --insecure               Whether or not to verify TLS certificates and treat this registry as a trusted
                               host
      --password-name string   The password for the registry referenced by the name of a secret in the secret
                               store
      --tag stringArray        Metadata tag(s) to associate with the registry
      --token-name string      The token for the registry referenced by the name of a secret in the secret
                               store
      --url string             The url of the registry
      --username string        The username for the registry

Options inherited from parent commands

      --config string   Path to the configuration file
      --raw             Displays the result of the command in its raw format
      --verbose         Enable verbose output

SEE ALSO