Don't know where else to ask this i it's not really Windows

46 views
Skip to first unread message

Kurt Buff

unread,
Nov 3, 2023, 9:02:52 PM11/3/23
to ntpowe...@googlegroups.com
My STFW is weak this afternoon - I think my alcohol circulation system has been overrun by hemoglobin-bearing cells.

I'm trying to install some modules on an Ubuntu machine (22.04, IIRC). I've got pwsh running on it - PowerShell 7.3.8.

but when I do this (running under my non-root account):
install-module -name <blah>

I get this:
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
Install-Package: No match was found for the specified search criteria and module name '<blah>'. Try Get-PSRepository to see all available registered module repositories.

This command
get-psrepository

Reveals this:
Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2

This command:
set-psrepository -name 'PSGallery' -SourceLocation 'https://www.powershellgallery.com/' -InstallationPolicy Trusted

gets this response:
Set-PSRepository: The specified Uri 'https://www.powershellgallery.com/' for parameter 'SourceLocation' is an invalid Web Uri. Please ensure that it meets the Web Uri requirements.

Running as root, it's even more frustrating - that account doesn't even show a psrepository, and I can't even configure one, trusted or not.

Wright, John M

unread,
Nov 6, 2023, 8:22:37 AM11/6/23
to ntpowe...@googlegroups.com

You might want to take a look at this:  Unable to resolve package source 'https://www.powershellgallery.com/api/v2' · Issue #153 · PowerShell/PowerShellGallery · GitHub

 

There are people pointing to issues with TLS.  One person resolved by setting TLS to 1.2.  Another (at the bottom of the thread) disabled 1.0.

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Kurt Buff
Sent: Friday, November 3, 2023 9:03 PM
To: ntpowe...@googlegroups.com
Subject: [ntpowershell] Don't know where else to ask this i it's not really Windows

 

This message is from an external sender.

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/CADy1Ce7OqgMXUs63r2ko5WXY0Eeiy0U0RCoUEfi7psjBgzsV6A%40mail.gmail.com.

[CAUTION] Do not click on links or open attachments unless you recognize the sender and know the content is safe.
If you believe this is a malicious email, please forward it the local IT team and click the Report Message button in Outlook.

 

Michael B. Smith

unread,
Nov 6, 2023, 9:31:04 AM11/6/23
to ntpowe...@googlegroups.com

For PSRepository, just set the installationpolicy. The sourcelocation was already accurate.

 

               set-psrepository -name PSGallery -InstallationPolicy Trusted

 

>> but when I do this (running under my non-root account):

>> install-module -name <blah>

 

You probably need “-scope currentuser”.

 

But I don’t have a ubuntu vm hanging around right now to test it.

Kurt Buff

unread,
Nov 6, 2023, 11:44:33 AM11/6/23
to ntpowe...@googlegroups.com
This gave me reason to believe that this is at least partially firewall certificate problem.

After issuing this command and getting the result shown:
Invoke-WebRequest: The remote certificate is invalid because of errors in the certificate chain: PartialChain

I've updated the certificate store on the machine. Unfortunately, when I issue command again, it hangs, then gives me this error:
Invoke-WebRequest: Unable to read data from the transport connection: Connection reset by peer.

So, for now, I'll go hunting elsewhere for clues on fixing this.

Kurt

Kurt Buff

unread,
Nov 6, 2023, 11:46:32 AM11/6/23
to ntpowe...@googlegroups.com
Unfortunately, my attempts to set the repository as trusted don't work, and don't emit an error.

I think until I get my firewall problem resolved I'm going to let this one rest. (See my reply to John.)

Thanks,
Kurt

Lenard Fudala

unread,
Nov 7, 2023, 4:32:55 PM11/7/23
to ntpowe...@googlegroups.com
Adding -Debug and -Verbose switches might help.
Also, basic errors go to /var/log/syslog


Lenard Fudala
System Administrator II
he/him/his

630.654.0170 x 2510 (o)

The Mx Group
We impact the marketplace
for companies
that impact the world.



Kurt Buff

unread,
Nov 7, 2023, 5:51:38 PM11/7/23
to ntpowe...@googlegroups.com
Ok - that's just weird...

I tried again to install a module,and while it warned me that the repository wasn't trusted, it let me install.

And, then I tried again to set psgallery to trusted, and that worked to.

I did this under my user account, not as root.

I have *NO* idea why it worked now, and not before, but I'll take it.

Kurt

Reply all
Reply to author
Forward
0 new messages