> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting Navigator to other repositories

Navigator integrates with Anaconda's free, public repository (Any storage location from which software or software assets, like packages, can be retrieved and installed on a local computer.) and premium, curated repository through different connection points. For more information, see our [pricing page](https://www.anaconda.com/pricing).

> [!NOTE]
>
> You can only be signed into one repository service at a time. However, you can be signed into Anaconda.com while also signed into a repository service.

## How to connect to other repositories

This guide takes you through the connection setup for Package Security Manager (Cloud and On-prem):

> [!NOTE]
>
> Anaconda Enterprise 4 is deprecated.

> [tab] PSM (Cloud)
>
> 1. Click **Connect** in the top-right corner of the Navigator application.
>
> 2. **Sign in** to *Package Security Manager (Cloud)*.
>
> 3. Enter your token (A randomly generated string that proves your identity and permission to access resources like channels, packages, or APIs.) to log in to your Package Security Manager (Cloud) instance.
>
>    > [accordion] Where is my token?
>    >
>    > You can issue yourself a *private* access token from the  **Token Access** page of your Anaconda.com organization. You must be assigned a seat to issue yourself a token. If you've lost your token, you can re-issue yourself a new token at any time. Re-issuing a token invalidates the previous token.
>    >
>    > For more information, see [Authenticating to Anaconda](https://anaconda.com/docs/anaconda-platform/getting-started-with-anaconda-platform.md#issuing-and-setting-your-token) in the Package Security Manager (Cloud) quickstart.
>
> 4. Click **Set Token**. If your token is valid, you will be signed in.
>
>    ![](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-desktop/nav-psm-cloud-token.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=fceb659391da0b34f4027a71c03186f4)
>
> > [!NOTE]
> >
> > For more information on adding channels (A location (URL or file path) in a repository where conda looks for packages.) from your Package Security Manager (Cloud) repo to Navigator, see [Adding an organization channel to your .condarc file](https://anaconda.com/docs/anaconda-platform/user/channels.md#adding-a-channel-to-your-condarc-file) in the Package Security Manager (Cloud) documentation.

> [tab] PSM (On-prem)
>
> 1. Click **Connect** in the top-right corner of the Navigator application.
>
> 2. **Sign in** to *Package Security Manager (On-prem)*.
>
> 3. If this is your first time logging in, enter your Package Security Manager (On-prem) domain and click **Set Domain**.
>
>    ![](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-desktop/nav-psm-on-prem-domain.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=09ff2223cf70eb62d7bb87c9e623e466)
>
> 4. Enter the credentials you use to log in to your Package Security Manager (On-prem) instance.
>
> 5. Click **Login**. If all credentials are correct, you will be signed in.
>
>    ![](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-desktop/nav-psm-on-prem-sign-in.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=32829e134d311473c11ce11e412f96d6)
>
> > [accordion] (Optional) Add channels from your Server instance to Navigator
> >
> > After signing in, select channels from the repository integration to use with Navigator.
> >
> > 1. Select **Add to channels** to add each channel to the `channels:` list in your `.condarc` file.
> > 2. Select **Add to default\_channels** to add each channel to your default channels.
> > 3. Click **Add channels** to save your selections.
> >
> >    ![](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-desktop/nav-psm-on-prem-channels.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=7f3aef840ed7a1f4b99bd111d2525ee9)
>
> > [!NOTE]
> >
> > The Package Security Manager (On-prem) connection also has a **Sign in with SSO** option. For more information on setting up an SSO connection for Package Security Manager (On-prem) using Okta, see [Okta integration using OIDC](https://anaconda.com/docs/psm-on-prem/6.8.0/admin/integrations/okta.md).
>
> Troubleshoot
>
> ### Trouble logging in to Package Security Manager (On-prem) in Navigator
>
> ***
>
> <details>
>   <summary>Cause</summary>
>
>   Login issues or inability to interact with Package Security Manager (On-prem) can be caused by stale authentication tokens or conflicting channel configurations in Navigator's config files.
> </details>
>
> ***
>
> <details>
>   <summary>Solution</summary>
>
>   If you are having issues logging in or know you're logged in but cannot interact with Package Security Manager (On-prem), try the following solution:
>
>   1. Set `logged_api_url`, `anaconda_server_token`, and `anaconda_server_token_id` in the Navigator config file (`anaconda-navigator.ini`) to **None**.
>
>      > [!NOTE]
>      >
>      > The `token` and `token_id` config variable names have been updated from `team_edition_token` to `anaconda_server_token` and `team_edition_token_id` to `anaconda_server_token_id` as of Navigator Version 2.4.0. If you downgrade your Navigator application to a version older than 2.4.0, you must manually change these variable names back to their previous versions within your `anaconda-navigator.ini` file.
>
>   2. Remove the `channel_alias:` entry from the conda configuration file (`.condarc`).
>
>   3. Try signing in again.
> </details>

## What happens when you connect to a repository

Navigator performs a few actions for you automatically when you connect to your repository:

> [tab] Package Security Manager
>
> * The `conda-token` tool sets your supplied organization token and automatically manages `default_channels`.

> [tab] Server
>
> * The `conda-repo-cli` tool creates a private token for you.
> * Navigator sets the private token in the Navigator config file (`anaconda-navigator.ini`). See [Package Security Manager (On-prem) token authentication](#package-security-manager-on-prem-token-authentication).
> * Navigator modifies the conda configuration file (`.condarc`):
>   * `channels` is set to an empty list
>   * `default_channels`, if present, is removed
> * Navigator asks you to manage your channels and default channels.

> [!NOTE]
>
> If you have already logged in to your repository using a CLI, Navigator detects that when it opens and shows a connection to that repository automatically. If you log out from your repository connection in Navigator, your CLI session is also affected accordingly.

## Package Security Manager (On-prem) token authentication

Your access token for Package Security Manager (On-prem) provides you with the ability to access your own private server channel. The access token is stored locally, which gives conda native access to your remote channel and packages.

![](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-desktop/nav-server-token.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=c0adda396c19929ff3278536ea0742d0)

> [!NOTE]
>
> To use other's private channels in Package Security Manager (On-prem), see [Setting/using a token](https://anaconda.com/docs/psm-on-prem/6.8.0/user/auth_token.md#setting-using-a-token) in the Package Security Manager (On-prem) documentation.

The variables `anaconda_server_token` and `anaconda_server_token_id` in the Navigator config file (`anaconda-navigator.ini`) are also updated when you first connect to Package Security Manager (On-prem). This is mostly system data to help Navigator integrate with Package Security Manager (On-prem).

![](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-desktop/nav-server-config.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=ce6989b24761780d3469fb3edd0f7ead)

> [!WARNING]
>
> The token and token ID config variable names have been updated from `team_edition_token` to `anaconda_server_token` and `team _edition_token_id` to `anaconda_server_token_id` as of Version 2.4.0. If you downgrade your Navigator application to a version older than 2.3.0, you will need to manually change these variable names back to their older versions within your `anaconda-navigator.ini` file.

## Changing the repository connection domain

When you first connect Navigator to a Server repository, you enter a domain URL before your login credentials. To change this domain:

1. Go to **Preferences**.

2. In **PSM On-Prem API domain**, enter a valid domain name.

   > [!NOTE]
   >
   > The domain must be a full path without a trailing slash. For example: `http(s)://mysite.com`

3. Click **Apply** to save your changes.

## How to disconnect from a repository

You can only be connected to one repository at a time.

To disconnect from a repository:

1. Click **Connect**.
2. Click **Sign out** beside the repository you are signing out of.

Channels that you have added to Navigator from Anaconda.org or a professional (repo.anaconda.cloud) repository are not automatically removed when you disconnect from those repositories. Navigator will still search those channels and install packages from them. If you no longer want those channels to be searched:

1. Open **Preferences** from the **File**, **Anaconda Navigator**, or **python** menus, depending on your setup.
2. Click **Configure Conda**.
3. Delete any channels in the `channels:` list that you no longer want to be connected to. Anaconda recommends against deleting `defaults`.

   For example, let's say you have disconnected from a Package Security Manager repository and have the following `channels:` list:

   ```sh theme={null}
   channels:
       - https://repo.anaconda.cloud/t/<TOKEN>/repo/business-org-name/channel1
       - https://repo.anaconda.cloud/t/<TOKEN>/repo/business-org-name/channel2
       - defaults
   ```

   You would delete the first two lines and leave `defaults` in your `channels:` list.

   ```sh theme={null}
   channels:
       - defaults
   ```
4. Click **Save and Restart**.

## What happens when you disconnect from a repository

Navigator performs a few actions for you automatically when you disconnect from your repository:

> [tab] Package Security Manager (Cloud)
>
> * The `conda-token` tool removes your supplied organization token.

> [tab] Package Security Manager (On-prem)
>
> * Navigator removes the access token created for you by `conda-repo-cli`.
> * Navigator sets `logged_api_url`, `anaconda_server_token`, and `anaconda_server_token_id` to `None` in the Navigator config file (`anaconda-navigator.ini`).
> * The conda configuration file (`.condarc`) returns to the state it was in before the login. (Navigator saves a copy of the `.condarc` file before a login is attempted.)
