Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Cannot push NuGet package to LDAP secured feed.
-
Hello,
We are running ProGet in a container using Podman instead of Docker and it looks to be operating well! We are currently running into an issue where we have LDAP enabled and are trying to have TeamCity publish built NuGet packages to a private feed.
I created an API Key under Administration, set that API Key to impersonate an AD user that has permissions set under "Users & Tasks", and I'm getting the following:
18:01:47 Step 11/11: Publish Packages (NuGet Publish) 18:01:47 Attempt to publish symbol package. Symbol packages are not fully supported by TeamCity internal feed. For more details see https://confluence.jetbrains.com/display/TCDL/NuGet#NuGet-symbols 18:01:47 push: Publish package Project\Project.2.1.0.symbols.nupkg 18:01:47 Starting: F:\TeamCity\Agents\01\tools\NuGet.CommandLine.5.8.1\tools\NuGet.exe push F:\TeamCity\Agents\01\work\b5fafe99a9e2e5c9\Project\Project.2.1.0.symbols.nupkg -ApiKey ******* -Source https://proget.dev.private.network/nuget/internal-nuget/v3/index.json 18:01:47 in directory: F:\TeamCity\Agents\01\work\b5fafe99a9e2e5c9\Project 18:01:49 MSBuild auto-detection: using msbuild version '16.9.0.16703' from 'F:\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\bin'. 18:01:50 Please provide credentials for: https://proget.dev.private.network/nuget/internal-nuget/v3/index.json 18:01:50 Unable to load the service index for source https://proget.dev.private.network/nuget/internal-nuget/v3/index.json 18:01:50 Response status code does not indicate success: 401 (Unauthorized). 18:01:50 UserName: 18:01:50 Process exited with code 1 18:01:50 Process exited with code 1 (Step: Publish Packages (NuGet Publish)) 18:01:50 Step Publish Packages (NuGet Publish) failed
I tried using
username:password
as the-ApiKey
value as well with the same result. Only thing I notice is that there is a line that looks to be prompting for a username.I tried searching through older forum posts, but I'm not sure how valid they are since they are from version before v4.x for the most recent posts that I could find.....
-
Hello,
The NuGet Client only uses the the
-ApiKey
you on certain requests to the-Source
, specifically thePUT
of the package file. Before doing that, it will query the package source using aGET
, and in this case, the API Key isn't sent.The easiest solution is to allow anonymous view access to your feed. That simplifies configuration for all users of your feed.
Alternatively, you will need to add credentials to the PackageSourceCredentials in the NuGet.config file . Note this file exists in several places, please see Config file locations and uses
Cheers,
Alana
-
I thought I did have anonymous View/Download on that feed, I did not. It's working now with the Api Key I set under administration, thank you!