Anaconda Server CLI¶
The Anaconda Server CLI is used by both users and administrators to do the following:
Install packages from private or authenticated channels
This topic provides guidance on the following actions:
Install the Anaconda Server CLI (hereafter referred to as simply CLI) the
conda install conda-repo-cli
The Anaconda Server administrators may also choose to mirror this package into a channel on the server.
Contact your administors to determine if
conda-repo-cli can be installed from an Anaconda Server channel.
Follow these steps to configure your conda repo site:
Use the following commands if you are using SSL:
# Replace <SITE_NAME> with the short tag you'll use to identify the fully qualified domain name. # Replace <DOMAIN> with your domain. conda repo config --set sites.<SITE_NAME>.url https://<DOMAIN>/api conda repo config --set default_site <SITE_NAME> # The following is an example of two sites, one for production and the second for development: # conda repo config --set sites.production.url https://prod.my-ate.company.com/api # conda repo config --set sites.development.url https://dev.my-ate.company.com/api
Use the following commands if you are not using SSL:
# Replace <SITE_NAME> with the short tag you'll use to identify the fully qualified domain name. # Replace <DOMAIN> with your domain. conda repo config --set sites.<SITE_NAME>.url http://<DOMAIN>/api conda repo config --set default_site <SITE_NAME>
For example, <SITE_NAME> may be anaconda-repo and <DOMAIN> may be anaconda-repo.company.com.
If you are using OAuth or SAML, run the following command to go through the standard SAML authorization flow after configuring your site:
conda repo config --set oauth2 true
when you run
conda repo login, a browser window will open for you to log in to Anaconda Server. After login has completed, the window will display “Token Received.”
You can then close the browser window and continue to use the CLI.
Run the following code to log in to Anaconda Server:
conda repo login # You will be prompted to enter your Anaconda Server username and password
Now you will be able to install packages from private and authenticated channels you have access to.
For a more robust view of conda repo commands, run the following command:
conda repo --help
--help or the shorthand
-h to a command will provide you with further actions you can take, such as the following:
conda repo mirror -h conda repo channel -h conda repo upload -h