Search code examples
visual-studioldapnugetsonatypenexus3

Sonatype Nexus3 nuget feed acces with LDAP and no anonymus acces


We try to set up a Sonatype Nexus3 repository for our nuget packages. Because the repo should be accessable from the internet (external developers), we disabled anonymous access and configured LDAP realm (Active Directory).

The developers could login to the web UI and serch for nuget artifacts. But if they try to get packages with Visual Studio, it fails with "404" error. No credential window is shown (or something else).

nuget package explorer fails with "401" error.

How can I get Nexus3 running with Visual Studio (2013/15)?


Solution

  • According to your description, I create a Sonatype Nexus3 repository for our nuget packages and disabled anonymous access and configured LDAP realm. When I use Visual Studio 2013/2015, both of the credential windows is shown. After entering the credential information, it list all nuget packages.

    The “404” error means not found. If I modify the repository url from Tools -> Options -> NuGet Package Manager -> Package Source, I will get the 404 error and the credential window will not pop up. Then I will get the 401 error which means unauthorized since you don’t enter your credential information.

    So please check the repository url to confirm the url is correctly. You could copy the URL to browser to verify whether it is accessible.