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
-
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
-
Hi @haralambop_0645 ,
Can you share more information about the usage scenario? Are you trying to use Docker images, for example?
Thanks,
Alana
-
@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
-
@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 sourcedotnet 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.
-
@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
-
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 thatfeeduser
is authorized to push packages to the feed, which you can do under Admin > Tasks.Cheers,
Alana
-
This post is deleted!