=========================================
Using conda with Package Security Manager
=========================================

In order to use conda to interact with your Package Security Manager channels, you must first configure your ``.condarc`` file. There are multiple methods for accomplishing this:

.. tab-set:: 

    .. tab-item:: Package Security Manager CLI

        For instructions on how to configure your ``.condarc`` using the CLI, see :ref:`Using the .condarc configuration wizard <config_wizard>`.

    .. tab-item:: conda config commands

        Choose a set of conda configuration commands that matches your setup:

        .. tab-set:: 

            .. tab-item:: SSL

                Set your channel alias by running the following command:

                .. code-block:: none

                    # Replace <FQDN> with your Package Security Manager fully qualified domain name
                    conda config --set channel_alias https://<FQDN>/api/repo
            
            .. tab-item:: No SSL

                Set your channel alias by running the following command:

                .. code-block:: none

                    # Replace <FQDN> with your Package Security Manager fully qualified domain name
                    conda config --set channel_alias http://<FQDN>/api/repo

        Once your channel alias is set, add any Package Security Manager channels you need to access to  your ``.condarc`` by running the following command:

        .. code-block:: none

            # Replace <CHANNEL_NAME> with the name of your channel
            conda config --add channels <CHANNEL_NAME>

        .. caution::

            You must run this command for each channel you need to access. 

For more information, see the `official conda documentation <https://docs.conda.io/en/latest/>`_.