Using credentials for custom pip repositories

You can use specific credentials for your custom pip repositories. You can create a credential of type basic and use it when creating a Python environment resource. You must use this credential name to authenticate against the pip repository for the python-env or airflow-python-env resource.

cde credential create --type basic --name <user-credential> --username <user-name>

When prompted, provide the password for the specified user name.

Example to create and use the credential with the pip repository.

  • For python-env resource:
    cde credential create --type basic --name testuser-cred --username userdemo
    
    cde resource create --name test-pyenv-with-cred --type python-env --pip-repository-url https://pypi.example.com/simple --pip-repository-cred testuser-cred --pip-repository-cert ~/Downloads/cert.pem 
  • For airflow-python-env resource:
    cde credential create --type basic --name testuser-cred --username userdemo
    
    cde resource create --name test-airflow-pyenv-with-cred --type airflow-python-env --pip-repository-url https://pypi.example.com/simple --pip-repository-cred testuser-cred --pip-repository-cert ~/Downloads/cert.pem