Use .netrc to Upload PyPI Packages

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Uploading PyPI packages to Artifactory using a .netrc file credentials is supported. For more information on the .netrc file , see The .netrc file and Purpose of the '.netrc' file.

Note

Keyring is not supported in Artifactory.

Note

The Twine client is not compatible with .netrc credentials.

To use the .netrc file:

  1. To create a .netrc file in your root directory and set it with the minimum required permissions (Chmod 600), if you do not have one already, run the following command:

    touch ~/.netrc
  2. Run the following command to populate the .netrc file with your Artifactory URL and credentials according to the .netrc file format:

    Note

    Make sure to replace the placeholders in bold with your own Artifactory URL, username, and password or identity token.

    echo "machine <ARTIFACTORY_URL> login <USERNAME> password <PASSWORD/TOKEN>" > ~/.netrc