Trying to register a psrepository behind a corporate proxy fails on Powershell Core.
1 2 3 4 5 6 7 8 9 10 11 |
$credential = Get-Credential $uri = 'https://localhost:8080/artifactory/api/nuget/custom_repository' $repoParams = @{ Name = 'custom_repository' SourceLocation = $uri PublishLocation = $uri InstallationPolicy = 'Trusted' PackageManagementProvider = 'NuGet' Verbose = $true } Register-PSRepository @repoParams -Credential $credential |
The error you receive is:
1 |
Register-PSRepository: The specified Uri 'https://localhost:8080/artifactory/api/nuget/custom_repository' for parameter 'SourceLocation' is an invalid Web Uri. Please ensure that it meets the Web Uri requirements. |
Running the same on Windows Powershell 5.1 works.
Now, let see why it’s not working on Powershell Core.
Trying to find more details about the […] Continue Reading…