How to run PS Rule with no internet access? #805
Replies: 1 comment 2 replies
-
@radams32-github If you have not updated this module then that could be a cause of the issue. This cmdlet will allow you to register then trust a local path or internal file share. The details for how to do this are available in the docs. See https://learn.microsoft.com/en-us/powershell/gallery/how-to/working-with-local-psrepositories?view=powershellget-2.x Otherwise if not set PSRule will default to PowerShell gallery. If the repository name is unknown then it could cause this issue. The easiest approach is to register the repository in the pipeline before calling PSRule. I hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Hi,
We are trying to run PS Rule on a Self Hosted DevOps agent where there is no internet access. I have the modules installed locally on the agent, but it seems to still want to try and re-install the modules from the PowerShell Gallery when the assert task runs:
If I specify a version of the modules I know are installed, and set the "Repository" variable to the path where they are, still get errors:
Just asking here if I am doing this the right way, or what I should be putting in the Repository variable. Is it even possible to make it not do an install, just use what is already on the agent?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions