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!

    Api key does not work

    Scheduled Pinned Locked Moved Support
    7 Posts 2 Posters 13 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.
    • H Offline
      haralambop_0645
      last edited by

      I'm currently evaluating the latest docker (proget.inedo.com/productimages/inedo/proget:23.0.20) and the api key seems not work.
      Although the user can be authenticated with the username and password, using the api key as password is not working

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

        Hi @haralambop_0645 ,

        Can you share more information about the usage scenario? Are you trying to use Docker images, for example?

        Thanks,
        Alana

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          haralambop_0645 @atripp
          last edited by

          @atripp RE:" Are you trying to use Docker images, for example?"
          Not yet. I have created a nuget feed.
          The api key works fine in the nuget push command but not in the nuget list

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

            @haralambop_0645 oh see - in this case, you'll need to add a source with the username api and password of your key using dotnet nuget add source

            dotnet nuget add source https://myProGetServer.local/nuget/myFeed/v3/index.json -n myFeed -u api -p myApiKey --store-password-in-clear-text
            

            This is because NuGet does not send an api key during list, it uses the name/password in the source file.

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              haralambop_0645 @atripp
              last edited by

              @atripp It does not work.

              I have added a source successfully

              nuget sources add -Name "Lighthouse" -source https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json -u feeduser -p ??????????????????????? -StorePasswordInClearText
              Package source with Name: Lighthouse added successfully.

              nuget push test.nupkg -source https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json
              MSBuild auto-detection: using msbuild version '15.0' from '/usr/local/Cellar/mono/6.12.0.182/lib/mono/msbuild/15.0/bin'.
              Using credentials from config. UserName: feeduser
              The remote server indicated that the previous request was forbidden. Please provide credentials for: https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json
              UserName:

              Even entering the api key in the command line does not work
              nuget push /Volumes/c$/Nuget/Packages/lighthouse.lh3.frontend/2.0.68/lighthouse.lh3.frontend.2.0.68.nupkg -source https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json -ApiKey ??????????????????
              MSBuild auto-detection: using msbuild version '15.0' from '/usr/local/Cellar/mono/6.12.0.182/lib/mono/msbuild/15.0/bin'.
              Using credentials from config. UserName: feeduser
              The remote server indicated that the previous request was forbidden. Please provide credentials for: https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json
              UserName:

              Here the output from docker logs
              nfo: Microsoft.AspNetCore.Hosting.Diagnostics[1]
              Request starting HTTP/1.1 GET https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json - -
              info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
              Request finished HTTP/1.1 GET https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json - - - 401 84 - 7.9011ms
              info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
              Request starting HTTP/1.1 GET https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json - -
              info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
              Request finished HTTP/1.1 GET https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json - - - 403 17 - 25.3999ms
              info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
              Request starting HTTP/1.1 GET https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json - -
              info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
              Request finished HTTP/1.1 GET https://nugetsrv.lighthouse.gr:8443/nuget/lighthouse/v3/index.json - - - 403 17 - 24.7868ms

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

                Hi @haralambop_0645 ,

                A 403 error means that the user does not have the required permission to perform the action. So you'll need to make sure that feeduser is authorized to push packages to the feed, which you can do under Admin > Tasks.

                Cheers,
                Alana

                1 Reply Last reply Reply Quote 0
                • H Offline
                  haralambop_0645
                  last edited by haralambop_0645

                  This post is deleted!
                  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