Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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.

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 11 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kichikawa_2913
      last edited by

      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.....

      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        Hello,

        The NuGet Client only uses the the -ApiKey you on certain requests to the -Source, specifically the PUT of the package file. Before doing that, it will query the package source using a GET, 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

        1 Reply Last reply Reply Quote 1
        • K Offline
          kichikawa_2913
          last edited by

          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!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation