Working with private channels using third-party tools
In order to access private channels via third-party tools (such as pip, Twine, or R), you must have a user token. This can be done through the conda repo tool or by creating channel-specific, read-only/read-write tokens via UI.
Python packages
Uploading
Twine is a popular tool for uploading Python packages to PyPI-like repositories. Run the following command to upload Python packages:
Example
If the token is incorrect, you will receive a 401 error message.
Please refer to the Twine package documentation to learn how to configure your username and password via the configuration file or environment variables.
Installing
Similar to pip, Anaconda Server supports user authentication using Basic Authentication. The following is the proper format for installing pip packages:
x-auth-token
is not a placeholder, but is used as the actual password for Basic Authentication.
Example
Make sure to add a trusted host.
Please refer to the pip documentation to learn how to configure the index URL via the configuration file or environment variables.
R packages
Uploading
Since there is no standard tool for uploading R packages, you can use either the UI or API directly. Run the following command to upload R packages:
Where <TOKEN>
is the x-auth-token
.
Example
Please use cran_source_package
for source packages and cran_binary_package
for binary R packages.
Installing
You can use your domain as a repository URL in the install.packages
function by injecting a token into the path:
This may look something like the following:
Example
Was this page helpful?