Repository navigation
Make all functions use the default proxy(if the proxy was enabled) when no proxy specified #44
Copy link
Copy link
Open
Labels
Milestone
Description
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
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.0 build {Clear-PSRepo, Compress-TestContent, Convert-TxtResourceToXml, ConvertFrom-PesterLog...}
Script 0.0 chuck Reset-FolderTime
Script 0.0 Get-PSGalleryApiAvailability
Manifest 6.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty...}
Manifest 6.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty...}
Manifest 6.1.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature...}
Manifest 6.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 6.1.0.0 Microsoft.WSMan.Management {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, Enable-WSManCredSSP...}
Script 1.1.7.2 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-PackageProvider...}
Script 1.0.0.0 posh-git {Add-PoshGitToProfile, Expand-GitCommand, Format-GitBranchName, Get-GitBranchStatusColor...}
Script 2.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability...}
Script 2.0.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler...}
> Get-Module -ListAvailable PowerShellGet,PackageManagement
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.1.7.2 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.6.7 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
> Get-PackageProvider
Name Version DynamicOptions
---- ------- --------------
NuGet 2.8.5.210 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 1.6.7.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Includes, DscResource, RoleCapability, Command, Ac...
> Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
NuGet 2.8.5.210 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 1.6.7.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Includes, DscResource, RoleCapability, Command, Ac...Reactions are currently unavailable
Activity
chucklu commentedon Sep 26, 2018
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).[-]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[/+]chucklu commentedon Apr 2, 2019
Hi Sydney Smith (@SydneyhSmith),
Do you have any plan about this feature? use the default proxy automatically.
edyoung commentedon Apr 2, 2019
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.
chucklu commentedon Apr 2, 2019
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.
chucklu commentedon Apr 2, 2019
I got the error info as following after waiting 5 minutes for Publish-Script
Benny1007 commentedon Jun 12, 2019
Chuck LU (@chucklu) what happens if you update your nuget.config file with your proxy details?
chucklu commentedon Jun 13, 2019
benny1007 (@Benny1007) As I mentioned here, the NuGet works fine with my default proxy. There is no need to add proxy to nuget.config.
chucklu commentedon Aug 27, 2019
Hi Steve Lee (@SteveL-MSFT) ,
Would this issue be solved by PowerShell/PowerShell#9495 ?
SydneyhSmith commentedon Aug 28, 2019
Chuck 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!
chucklu commentedon Aug 29, 2019
I will try with Powershell7-preview3 later.
Find-Module WindowsCompatibility