Skip to content
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

Ubuntu 20.04.6 LTS from Powershell 7.4.1 can't download any PowerShellGallery module #271

Open
3 tasks done
Igor-ABI opened this issue Apr 19, 2024 · 2 comments
Open
3 tasks done

Comments

@Igor-ABI
Copy link

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

From Self-hosted agent for DevOps with Ubuntu 20.04.6 LTS and PowerShell 7.4.1
With root account any module installation process is failing since more than a month, any idea what can be the issue? I applied TLS1.2 mitigation but doesn't do any difference in Ubuntu
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

PS /home/Root_SH> Install-Module -Name Az.Accounts -RequiredVersion 2.17.0

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/Az.Accounts/2.17.0' is not valid.
Install-Package: Package 'Az.Accounts' failed to download.

Expected behavior

Install-Package: Package 'Az.Accounts' COMPLETED

Actual behavior

**WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/Az.Accounts/2.17.0' is not valid.
Install-Package: Package 'Az.Accounts' failed to download.**

Error details

No response

Environment data

PS /home/Root_SH> $PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      4      1

Version

7.4.1

Visuals

image

@alerickson
Copy link
Member

@Igor-ABI what's the response when you run invoke-webrequest "https://www.powershellgallery.com/api/v2/package/Az.Accounts/2.17.0"?

@Igor-ABI
Copy link
Author

Thks Alerickson for the answer! looks network related!

OUTPUT of the invoke-webrequest

cmdlet Invoke-WebRequest at command pipeline position 1
Supply values for the following parameters:
Uri: https://www.powershellgallery.com/api/v2/package/Az.Accounts/2.17.0
Invoke-WebRequest: Network is unreachable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants