I’m trying to create a PowerShell Modules repository in Nexus 3 and I’m having issues with authentication.
The repository has been setup as a hosted nuget repository with anonymous access turned off.
When I use nuget.exe to manage the repository it seems to work fine. However, when I try to register the repository with PowerShell using the command:
register-psrepository -Name 'RepoName' -SourceLocation https://something:8443/repository/powershellmodules/ -PublishLocation https://something:8443/repository/powershellmodules/ -Credential (Get-Credential) -InstallationPolicy Trusted -PackageManagementProvider nuget
It prompts for username and password which I enter and I get this error:
WARNING: Unable to resolve package source 'https://something:8443/repository/powershellmodules/'
Any subsequent attempt using
Now I know this is perhaps a PowerShell issue but I wanted to check if anybody else has set this up? I did find a blog post stating that Anonymous access has to be turned on but it appears that PowerShellGet doesn’t need this anymore.
Any help appreciated.