Is there a way to restrict the use of specific channels for all users?

The cluster that I help manage the software stack for offers a system-wide conda/mamba installation that our users can use to create their own environments and install packages.

To ensure that we are in compliance with Anaconda’s license restrictions, is there some way that we can restrict the channels that users can access to install packages from? In other words, can we somehow prevent the use of the anaconda and defaults (and any other non-free) channels?

I know we can set it so that the conda-forge channel is used by default, but is there any way to be more strict than this? It seems trivially easy to get around the default setting and use the non-free channels.

Thanks!
Dave

Nothing in conda right now (although a precommand plugin should be able to prevent this by inspecting context.channels before allowing things to run).

I recommend instead blocking the traffic to the defaults channels at repo.anaconda.com.

1 Like

Thanks, that seems like a good idea.

For those following, a new feature is being planned for conda: Add `denylist_channels` config option. by jezdez · Pull Request #14196 · conda/conda · GitHub