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
.netrccredentials.
To use the .netrc file:
To create a
.netrcfile 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
.netrcfile with your Artifactory URL and credentials according to the.netrcfile 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