Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Powershell "Unable to resolve package source" - Proget PSRepository
-
Hello. I am new to proget, I inherited it from the former net admin. It is largely used by the syasadmins to run powershell scripts to stage new computers. They came to me with this problem. I am not sure when this problem, but maybe within the year.
Proget version 5.1.7 (Build 2)
there are various commands that will cause the error, but for example, when running a find-module -name XYZ, powershell returns
"
WARNING: Unable to resolve package source https://www.powershellgallery.com/api/v2'.
WARNING: Unable to resolve package source 'http://proget.domain.org/nuget/ps'
"I looked into the unable to resolve package error and I found plenty about the powershellgallery.com. In fact, if I run this command, the powerhsellgallery.com error goes away and I am left with only the local proget/nuget repository error.
"[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12"This leads me to believe that the error with the local repository has something to do with TLS or another type of encryption. The issue is that I have added all the reg keys that I found referenced to force the strong encryption to no change.
I am not sure how to go about identifying what proget is requesting be used. Any insight would be appreciated.
This is happening on any computer/server I have tested with. I am able to register-psrepository successfully, but cannot make a connection to it after that.
-
It seems that PowerShell client doesn't provide much details about errors, so glad you could figure out what the issue was for powershellgallery.com. That message probably could mean a lot of things, and is probably unrelated to TLS/SSL..
So the first thing that's jumping out to me is this:
WARNING: Unable to resolve package source 'http://proget.domain.org/nuget/ps'
There is no https connection, so there'd be no TLS/SSL issues. But assuming you may have changed the url when posting this... here is a registry key you can use to force that setting (it makes that powershell command unnecessary)
https://inedo.com/support/kb/1161/tls-v12-configuration-and-connection-errors
If you're on HTTPS the other thing to look at would be certificates.
Otherwise, you may need to use something like Fiddler to see the actual request/responses that PowerShell client is issuing/reciveing.