New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to find module providers (PowerShellGet). #183
Comments
Looks like I solved the issue. I installed Chocolatey by using the CMD.exe method. I ran CMD.exe as an administrator and ran the following command:
Now I have a PS Repository: PS C:\WINDOWS\system32> Get-PSRepository
I'm guessing something during the install of Chocolatey, repaired whatever was broken. |
I got the same issue for on clean Windows Server 2016 virtual machine. Probably it happened when network was not available.
Execute the command to fix (solution from http://www.classcastexception.com/2016/04/install-container-support-on-windows.html):
Then restart PowerShell. Chocolatey installation should help too. |
I have no luck with this problem PS C:\Windows\system32> Get-PSRepository
WARNING: Unable to find module repositories. PS C:\Windows\system32> [environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 14393 0 PS C:\Windows\system32> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 14393 693 PS C:\Windows\system32> Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
Chocolatey 2.8.5.130 SkipDependencies, ContinueOnFailure, ExcludeVersion, ForceX86, PackageSave...
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
NuGet 2.8.5.208 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag...
PowerShellGet 1.0.0.1 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, ...
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent I tried PS C:\Windows\system32> Register-PSRepository -Default -Verbose
VERBOSE: Performing the operation "Register Module Repository." on target "Module Repository 'PSGallery' () in provider 'PowerShellGet'.". Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force but get-psrepository stays empty - can you help me with this strange situation? |
Try following command:
|
PS C:\Windows\system32> Register-PSRepository -Name PSGallery -SourceLocation https://www.powershellgallery.com/api/v2/
-PackageManagementProvider NuGet -PublishLocation https://www.powershellgallery.com/api/v2/package/ -ScriptSourceLocatio
n https://www.powershellgallery.com/api/v2/items/psscript/ -ScriptPublishLocation https://www.powershellgallery.com/api/
v2/package/
Register-PSRepository : Use 'Register-PSRepository -Default' to register the PSGallery repository.
At line:1 char:1
+ Register-PSRepository -Name PSGallery -SourceLocation https://www.pow ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (PSGallery:String) [Register-PSRepository], ArgumentException
+ FullyQualifiedErrorId : UseDefaultParameterSetOnRegisterPSRepository,Register-PSRepository |
@msvalliant did you find and solution to your problem above? I am coming across the exact same error. |
@samkh79 I have contacted network admins to help me solve this problem, and they did it somehow. As I understand it is problem with whitelist/blacklist of host in firewall settings |
@msvaillant Thank you for the post. It saves me a ton of time. I'll abandon trying to use the psgallery from work. |
I began encountering problems with executing Before SSL/TLS hardening was backed out, I saw Event ID 36871 in the System log each time I tried to install the NuGet provider. The event text was:
Edit: Further investigation has revealed that the client library being used to fetch repo data is only capable of TLS 1.0, while the host invoking |
I am getting the same problem on a Windows Server 2016 version 1607 Build 14393.447 installation with GUI, but it's not happening on the installation without GUI. $PSVersionTable return exactly same version on both installation. |
I also have the network team enable internet access temporarily on the servers to make it to work. |
This is on spot - thanks a lot |
Register-PSRepository -Default then
Name InstallationPolicy SourceLocation PSGallery Untrusted https://www.powershellgallery.com/api/v2 |
For those who have performed protocol/cipher suite hardening, you can use this on a per-session basis to tell the client to use TLS 1.2 instead:
Just run that right before your Get-PSRepository or Install-Module ;) |
What worked for me was to disable FIPS in regedit and reboot. Then run [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12. Finally, run Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force. |
Hey @JrEach25 don't know if you'll ever read this but you saved me !!! spend about two hours trying to get this sorted, I'm not sure if the issue is related to windows virtual machines ? or some update ? |
Hi @ChrisKapend are you still having this issue with the latest version of PackageManagement? If so what command are you running? |
Hi @alerickson thanks for reaching out, after updating NuGet version 3.0.0.1 the error disappears |
I know this is bit old but you need to set following Enable-TlsCipherSuite -Name "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" -Position 0 if you are restricting ciphers in enviorment |
System Info:
Error:
The below returns nothing:
The text was updated successfully, but these errors were encountered: