Repository navigation
Make all functions use the default proxy(if the proxy was enabled) when no proxy specified #44
Description
Activity
The same problem with
Install-Module, I think you should make all function can work with the default proxy by default automatically(when the default proxy was enabled).~\source\repos\GitHub\Other\PowerShellGet [development ≡]> ((Get-Command -Name Install-Module).Parameters).Keys Name InputObject MinimumVersion MaximumVersion RequiredVersion Repository Credential Scope Proxy ProxyCredential AllowClobber SkipPublisherCheck Force AllowPrerelease AcceptLicense Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable WhatIf Confirm
- changed the title
[-]Make the Register-PSRepository use the default proxy(if the proxy was enabled) when no proxy specified[/-][+]Make all functions use the default proxy(if the proxy was enabled) when no proxy specified[/+]on Apr 2, 2019 Hi Sydney Smith (@SydneyhSmith),
Do you have any plan about this feature? use the default proxy automatically.I'm afraid we have no plan to implement. That doesn't mean it won't happen or we think it's a bad idea, just that everyone is working on other things at the moment (most bugs fall in to this category). Happy to consider PRs, or if this gets lots of upvotes or passionate comments it will move up the list.
Hi Edwin Young (@edyoung) ,
I encounter the same problem again when I am using Publish-Script function, you can check more details in https://github.com/PowerShell/PowerShellGet/issues/458 .
There is no Proxy parameter for Publish-Script, I did not have a chance to specify the proxy.I got the error info as following after waiting 5 minutes for Publish-Script
Publish-PSArtifactUtility : Failed to publish script 'chuck': 'info : Pushing chuck.1.0.0.nupkg to 'https://www.powershellgallery.com/api/v2/package/'... info : PUT https://www.powershellgallery.com/api/v2/package/ info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request will now be retried. info : An error occurred while sending the request. info : The server returned an invalid or unrecognized response. info : PUT https://www.powershellgallery.com/api/v2/package/ info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request will now be retried. info : An error occurred while sending the request. info : The server returned an invalid or unrecognized response. info : PUT https://www.powershellgallery.com/api/v2/package/ error: The operation was canceled. error: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request.. error: The I/O operation has been aborted because of either a thread exit or an application request. error: Pushing took too long. You can change the default timeout of 300 seconds by using the --timeout <seconds> option with the push command. '. At C:\Program Files\PowerShell\Modules\PowerShellGet\2.1.2\PSModule.psm1:10952 char:17 + ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : FailedToPublishTheScript,Publish-PSArtifactUtility
Chuck LU (@chucklu) what happens if you update your nuget.config file with your proxy details?
benny1007 (@Benny1007) As I mentioned here, the NuGet works fine with my default proxy. There is no need to add proxy to nuget.config.
Hi Steve Lee (@SteveL-MSFT) ,
Would this issue be solved by PowerShell/PowerShell#9495 ?SydneyhSmith commented
on Aug 28, 2019 CollaboratorMore actionsChuck LU (@chucklu) looking through this issue and wondering if you have had a chance to see if you are still hitting this issue on the latest versions of PowerShell(7 - preview 3) and PowerShellGet (2.2.1)?Thanks!
I will try with Powershell7-preview3 later.
Find-Module WindowsCompatibility
Expected Behavior
register the ps repository successfully
Current Behavior
nothing happened
Possible Solution
when no proxy specified, then invoke the default proxy (when the proxy was enabled)
https://stackoverflow.com/questions/571429/powershell-web-requests-and-proxies
Steps to Reproduce (for bugs)
set the proxy on computer
Context
related to PowerShell/WindowsCompatibility#45
I want to register ps repository
Your Environment