create registry pypi

Prev Next

iagctl create registry pypi

Create a new pypi registry

Synopsis

This command creates a PyPI registry reference in your gateway's data store. IAG supports creating registries that point to any PyPI registry for use with your Python services.

By default, IAG includes a PyPI registry called default-pypi that points to the public PyPI registry at https://pypi.org/simple. You can create a new default registry by specifying the --default flag.

You can specify the URL of the registry you want to create using the --url flag. You can find the URL of the registry you want to use from your PyPI instance's documentation or configuration settings.

You can use several flags to specify the type of authentication required to access the registry. By default, IAG doesn't use authentication.

Use the --username and --password-name flags to specify basic authentication. Use the --token-name flag to specify token authentication. The --password-name and --token-name flags reference the names of secret resources that contain the actual password or token value. See the 'Handle secret values' section displayed when you run iagctl create registry -h for more information about using secrets with registries.

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

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

Examples

Create a PyPI registry that requires basic authentication

The following example creates a registry called my-pypi-registry that requires a username and password to authenticate. The username is admin and the password references a secret called pip_password.

iagctl 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

The following example creates a registry called my-pypi-registry that requires a token to authenticate. The token value references a secret called pip_token.

iagctl 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

Learn more