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

# Repo CLI troubleshooting

Troubleshoot

### `Unauthorized`

***

<details>
  <summary>Cause</summary>

  The server recognized your credentials but denied permission for the requested operation. This can occur when your user account or token does not have the required role or scope to access the target resource, such as a private channel or an admin-only endpoint.
</details>

***

<details>
  <summary>Solution</summary>

  Verify that your token has the required permissions by checking your auth tokens:

  ```sh theme={null}
  conda repo auth --list
  ```

  If permissions are insufficient, request access from your organization administrator or create a new token with the appropriate scopes.
</details>

Troubleshoot

### `NotFound`

***

<details>
  <summary>Cause</summary>

  The requested resource does not exist on the server. This typically means the channel name, package name, or artifact identifier in the command does not match any resource on the configured site. It can also occur when targeting the wrong site in a multi-site configuration.
</details>

***

<details>
  <summary>Solution</summary>

  Double-check the resource name in your command. You can list available channels to confirm the name:

  ```sh theme={null}
  conda repo channel --list
  ```

  If you have multiple sites configured, make sure you are targeting the correct one with the `--site` option. Place `--site` before the subcommand:

  ```sh theme={null}
  conda repo --site <SITE> channel --list
  ```
</details>

Troubleshoot

### `NoDefaultUrl` or commands connect to anaconda.com

***

<details>
  <summary>Cause</summary>

  No repository URL has been configured. `conda-repo-cli` needs to know which Package Security Manager instance to connect to, and no `default_site` was found in your `.conda/repo-cli-config.yaml` file.

  In most cases, `conda-repo-cli` doesn't show this error. Instead, it uses your `anaconda-auth` default site, which is usually anaconda.com, and sends commands there instead of to your Package Security Manager. Depending on whether you're logged in to anaconda.com, commands might:

  * Return your anaconda.com account or data
  * Fail with `Error: Permission Denied` and a 403 status code, with a message saying you're authenticated but don't have permission and should contact your administrator

  The permission message is misleading. The cause is the missing site configuration, not your permissions. To check, run `conda repo whoami` and confirm that it shows your Package Security Manager user.
</details>

***

<details>
  <summary>Solution</summary>

  Set your Package Security Manager domain as the default site:

  ```sh theme={null}
  conda repo config --set-site <DOMAIN_NAME>
  ```

  For a full walkthrough, see [Getting started with the CLI](https://anaconda.com/docs/psm-on-prem/6.8.0/cli/getting-started.md#configuring-the-cli).
</details>

Troubleshoot

### `ChannelFrozen`

***

<details>
  <summary>Cause</summary>

  The target channel is frozen. Freezing a channel stops its index from rebuilding and blocks copying packages into it, and moving or removing packages from it. You can still upload to a frozen channel, but uploaded packages don't appear until the channel is unfrozen.
</details>

***

<details>
  <summary>Solution</summary>

  If you need to modify the channel, unfreeze it first:

  ```sh theme={null}
  conda repo channel --unfreeze <CHANNEL>
  ```

  If the channel was frozen intentionally and should not be modified, use a different channel for your operation.
</details>

Troubleshoot

### `AnacondaAuthError` (401) after running `conda repo wizard`

***

<details>
  <summary>Cause</summary>

  `conda repo wizard` adds a `channel_settings` block to your `.condarc` that tells conda to authenticate to Package Security Manager with `anaconda-auth`. If your Package Security Manager uses legacy authentication, `anaconda-auth` has no credentials for it, so conda commands fail with an error like:

  ```text theme={null}
  AnacondaAuthError: Received authentication error (401) when accessing defaults. If your token is invalid or expired, please re-install with `anaconda token install`.
  ```

  To check whether your Package Security Manager uses legacy authentication, run `conda repo config --show-sources`. A value of `legacy_psm_server: true` means it does.
</details>

***

<details>
  <summary>Solution</summary>

  Open your `.condarc` file and delete the `channel_settings` block that points to your Package Security Manager:

  ```yaml theme={null}
  channel_settings:
  - auth: anaconda-auth
    channel: <PSM_URL>
  ```

  Leave the rest of your `.condarc` unchanged. Conda uses the token that `conda repo login` saved, so you don't need to install a separate token.
</details>

Troubleshoot

### `UnavailableInvalidChannel` (404) for a Package Security Manager channel

***

<details>
  <summary>Cause</summary>

  A channel in your `default_channels` list contains no packages, so it has no index for conda to read. Conda doesn't skip an empty channel; it fails the entire command with an error like:

  ```text theme={null}
  UnavailableInvalidChannel: HTTP 404 Not Found for channel <CHANNEL_NAME> <https://<FQDN>/api/repo/<CHANNEL_NAME>>
  ```

  This often happens after you add an empty channel as a default channel in `conda repo wizard`. It can also happen when a channel is frozen while a mirror runs, because packages don't appear until the channel is unfrozen.
</details>

***

<details>
  <summary>Solution</summary>

  Remove the empty channel from your default channels:

  ```sh theme={null}
  conda config --remove default_channels <CHANNEL_URL>
  ```

  Comments

  Replace \<CHANNEL\_URL> with the full channel URL shown in the error.

  To see your current default channels, run `conda config --show default_channels`. If the channel is frozen, unfreeze it with `conda repo channel --unfreeze <CHANNEL_NAME>` and wait for its packages to appear.
</details>

Troubleshoot

### SSL verification error

***

<details>
  <summary>Cause</summary>

  This error often occurs when an organization uses internally generated certificates signed by a private Certificate Authority. Internal CAs aren't included in the standard system trust store, so SSL verification fails when the client cannot validate the server's certificate.
</details>

***

<details>
  <summary>Solution</summary>

  Run the following command to disable SSL certificate check:

  ```sh theme={null}
  conda repo config --set ssl_verify False
  ```

  Verify the above command worked:

  ```sh theme={null}
  conda repo config --show
  ```
</details>
