Disable public repository

This forum is for the discussions and support for the Chocolatey For Automate plugin. Inside you will find the Documentation Project forum that describes the operation of the plugin.
Post Reply
cbacon
Posts: 7
Joined: Thu Feb 16, 2023 7:15 pm
1

Disable public repository

Post by cbacon »

Is it possible to disable access to the public repository, only allowing access to custom repositories?

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Disable public repository

Post by Cubert »

Sure you can do that,

You can places sources in our source (repo) manager to distribute the sources you like. You will find this as a "Add Repo" button in the global tool view.

To remove the default source

Code: Select all

chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
Create a one line Automate Script that executes powershell script and in the powershell script area add the following command.

Code: Select all

c:\programdata\chocolatey\bin\choco.exe source remove -n="chocolatey"
Save, then schedule the script on all agents you want to remove the default repo from.

If you added or will add a new repo via the add repo button then these sources will be maintained by the plugin and pushed down to the agents automatically as they come and go from your system.

If you ever need to restore an agent to the default settings, use the source manager menu item under the agent in the client view to view current applied repos and to remove any one of the custom repos or reset agent to default which will remove all repos and add back the chocolatey repo as the only repo assigned to agent.

I hope that answers the question for you.

Post Reply

Return to “Chocolatey For Automate”