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
For information on how to use a Keyring provider via PyPI repositories, click here.
The Twine client is not compatible with
.netrc
credentials.
To use the .netrc
file:
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
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