> ## 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

export const TroubleshootSolution = ({children}) => <>
    <hr className="my-3 w-full" />
    <details className="mt-3">
      <summary className="cursor-pointer font-semibold text-base mb-1">
        Solution
      </summary>
      <div className="mt-2 ml-4" data-component-part="step-content">
        {children}
      </div>
    </details>
  </>;

export const TroubleshootCause = ({children}) => <details className="mt-3 mb-2">
    <summary className="cursor-pointer font-semibold text-base mb-1">
      Cause
    </summary>
    <div className="mt-2 ml-4" data-component-part="step-content">
      {children}
    </div>
  </details>;

export const TroubleshootTitle = ({children}) => <>
    <p className="m-0 font-semibold text-xl leading-tight mb-2" role="heading" aria-level={3}>
      {children}
    </p>
    <hr className="my-3 w-full" />
  </>;

export const Troubleshoot = ({children}) => <div className="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border troubleshoot-admonition dark:troubleshoot-admonition" data-callout-type="troubleshoot">
    <div className="mt-0.5 w-4">
      <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" className="w-4 h-4" aria-label="Troubleshoot">
        <path d="M541.4 162.6C549 155 561.7 156.9 565.5 166.9C572.3 184.6 576 203.9 576 224C576 312.4 504.4 384 416 384C398.5 384 381.6 381.2 365.8 376L178.9 562.9C150.8 591 105.2 591 77.1 562.9C49 534.8 49 489.2 77.1 461.1L264 274.2C258.8 258.4 256 241.6 256 224C256 135.6 327.6 64 416 64C436.1 64 455.4 67.7 473.1 74.5C483.1 78.3 484.9 91 477.4 98.6L388.7 187.3C385.7 190.3 384 194.4 384 198.6L384 240C384 248.8 391.2 256 400 256L441.4 256C445.6 256 449.7 254.3 452.7 251.3L541.4 162.6z" />
      </svg>
    </div>
    <div className="prose min-w-0 w-full">{children}</div>
  </div>;

Navigator integrates with Anaconda's free, public <Tooltip tip="Any storage location from which software or software assets, like packages, can be retrieved and installed on a local computer.">repository</Tooltip> 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.
</Note>

## 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.
</Note>

<Tabs>
  <Tab title="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 <Tooltip tip="A randomly generated string that proves your identity and permission to access resources like channels, packages, or APIs.">token</Tooltip> to log in to your Package Security Manager (Cloud) instance.

           <Accordion title="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](/anaconda-platform/cloud/getting-started-with-anaconda-platform#issuing-and-setting-your-token) in the Package Security Manager (Cloud) quickstart.
           </Accordion>

    4. Click **Set Token**. If your token is valid, you will be signed in.

           <Frame>
             <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/nav-psm-cloud-token.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=6a34c35c1b6e8b6b234ec54e05957829" alt="" width="764" height="504" data-path="images/nav-psm-cloud-token.png" />
           </Frame>

    <Note>
      For more information on adding <Tooltip tip="A location (URL or file path) in a repository where conda looks for packages.">channels</Tooltip> from your Package Security Manager (Cloud) repo to Navigator, see [Adding an organization channel to your .condarc file](/anaconda-platform/cloud/user/channels#adding-a-channel-to-your-condarc-file) in the Package Security Manager (Cloud) documentation.
    </Note>
  </Tab>

  <Tab title="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**.

           <Frame>
             <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/nav-psm-on-prem-domain.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=2e3bedfffdcdffe1aaba880fd58987c6" alt="" width="764" height="504" data-path="images/nav-psm-on-prem-domain.png" />
           </Frame>

    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.

           <Frame>
             <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/nav-psm-on-prem-sign-in.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=681eebc57e36ed3e3d616668f7d40b25" alt="" width="764" height="504" data-path="images/nav-psm-on-prem-sign-in.png" />
           </Frame>

    <Accordion title="(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.

               <Frame>
                 <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/nav-psm-on-prem-channels.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=1fcd8f79339522025be1844dc8a87b88" alt="" width="764" height="504" data-path="images/nav-psm-on-prem-channels.png" />
               </Frame>
    </Accordion>

    <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](/psm/on-prem/6.8.0/admin/integrations/okta).
    </Note>

    <Troubleshoot>
      <TroubleshootTitle>
        ### Trouble logging in to Package Security Manager (On-prem) in Navigator
      </TroubleshootTitle>

      <TroubleshootCause>
        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.
      </TroubleshootCause>

      <TroubleshootSolution>
        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.
                   </Note>

        2. Remove the `channel_alias:` entry from the conda configuration file (`.condarc`).

        3. Try signing in again.
      </TroubleshootSolution>
    </Troubleshoot>
  </Tab>
</Tabs>

## What happens when you connect to a repository

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

<Tabs>
  <Tab title="Package Security Manager">
    * The `conda-token` tool sets your supplied organization token and automatically manages `default_channels`.
  </Tab>

  <Tab title="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.
  </Tab>
</Tabs>

<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.
</Note>

## 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.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/nav-server-token.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=e8c31b238138e5277a31d8ffac3ce73b" alt="" width="3440" height="1088" data-path="images/nav-server-token.png" />
</Frame>

<Note>
  To use other's private channels in Package Security Manager (On-prem), see [Setting/using a token](/psm/on-prem/6.8.0/user/auth_token#setting/using-a-token) in the Package Security Manager documentation.
</Note>

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).

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/eSsEBS6xLmJK8V-1/images/nav-server-config.png?fit=max&auto=format&n=eSsEBS6xLmJK8V-1&q=85&s=384740a553f1bd6031b716a1ca1a80c7" alt="" width="3460" height="2162" data-path="images/nav-server-config.png" />
</Frame>

<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.
</Warning>

## 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`
   </Note>

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:

<Tabs>
  <Tab title="Package Security Manager (Cloud)">
    * The `conda-token` tool removes your supplied organization token.
  </Tab>

  <Tab title="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.)
  </Tab>
</Tabs>
