You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verified this is not an issues in the underlying windows container that should be reported to Windows Feedback Hub
Steps to reproduce
Under powershell:preview-ubuntu-24.04, we cannot get NTLM authentication with our HTTP(S) proxy to work. Therefore, we cannot install PowerShell modules. We supply the proxy credentials via en environment variable (which seems to be picked up).
docker run -e ALL_PROXY="http://<username>:<pw>@<proxyfqdn>:8080" --rm --name pwsh -it mcr.microsoft.com/powershell:preview-ubuntu-24.04
I believe we are hitting dotnet/runtime#100231. Our Wireshark capture shows a first CONNECT to the proxy to be initiated without authentication. A second CONNECT is initiated with a Proxy-Authorization header, but that still returns 407.
PS /> [System.Net.Http.HttpClient]::DefaultProxyCredentials-----------System.Net.Http.HttpEnvironmentProxyCredentialsPS /> Install-PSResource -Name Az -Scope CurrentUserUntrusted repositoryYou are installing the modules from an untrusted repository. If you trust this repository, change its Trusted value by running the Set-PSResourceRepository cmdlet. Are you sure you want to install thePSResource from 'PSGallery'?[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): AInstall-PSResource: 'The proxy tunnel request to proxy 'http://<user>:<pw>@<proxyfqdn>:8080/' failed with status code '407'."' Request sent: 'https://www.powershellgallery.com/api/v2/FindPackagesById()?%24filter=Id+eq+%27Az%27+and+IsLatestVersion+eq+true&%24inlinecount=allpages&id=%27Az%27'Install-PSResource: Package(s) 'Az' could not be installed from repository 'PSGallery'.
Error details
PS /> Get-ErrorException : Type : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException Message : Package(s) 'Az' could not be installed from repository 'PSGallery'. HResult : -2146233088TargetObject : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResourceCategoryInfo : InvalidData: (Microsoft.PowerShel…s.InstallPSResource:InstallPSResource) [Install-PSResource], ResourceNotFoundExceptionFullyQualifiedErrorId : InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResourceInvocationInfo : MyCommand : Install-PSResource ScriptLineNumber : 1 OffsetInLine : 1 HistoryId : 3 Line : Install-PSResource -Name Az -Scope CurrentUser Statement : Install-PSResource -Name Az -Scope CurrentUser PositionMessage : At line:1 char:1 + Install-PSResource -Name Az -Scope CurrentUser + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ InvocationName : Install-PSResource CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, <No file>: line 1PipelineIterationInfo : 0 1
Prerequisites
Steps to reproduce
Under powershell:preview-ubuntu-24.04, we cannot get NTLM authentication with our HTTP(S) proxy to work. Therefore, we cannot install PowerShell modules. We supply the proxy credentials via en environment variable (which seems to be picked up).
docker run -e ALL_PROXY="http://<username>:<pw>@<proxyfqdn>:8080" --rm --name pwsh -it mcr.microsoft.com/powershell:preview-ubuntu-24.04
I believe we are hitting dotnet/runtime#100231. Our Wireshark capture shows a first CONNECT to the proxy to be initiated without authentication. A second CONNECT is initiated with a Proxy-Authorization header, but that still returns 407.
The Ubuntu 22.04 and Alpine 3.20 images behave differently, there the second CONNECT message is not send at all. I believe these hit NTLM authentication not working in Linux based environment · Issue #101058 · dotnet/runtime instead.
Proxy authentication under Windows works.
Expected behavior
Az Module is installed.
Actual behavior
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: