Using nuget.exe to publish into teamcity nuget repo

Hi

I wonder if it is possible to use nuget.exe to push packages to the TeamCity nuget repository.

when I try this:

NuGet.exe push -source http://teamcity:8111/httpAuth/app/nuget/v1/FeedService.svc .\MySuperPackage.1.0.0.0.nupkg

i get this:

WARNING: No API Key was provided and no API Key could be found for 'http://teamcity:8111/httpAuth/app/nuget/v1/FeedServic
e.svc'. To save an API Key for a source use the 'setApiKey' command.
Pushing MySuperPackage.1.0.0.0.nupkg to 'http://teamcity:8111/httpAuth/app/nuget/v1/FeedService.svc'...
Please provide credentials for: http://teamcity:8111/httpAuth/app/nuget/v1/FeedService.svc
UserName: LeUser
Password: ********
Please provide credentials for: http://teamcity:8111/httpAuth/app/nuget/v1/FeedService.svc
UserName: LeUser
Password: ********
Please provide credentials for: http://teamcity:8111/httpAuth/app/nuget/v1/FeedService.svc
UserName:

etc...

and when I try this:

NuGet.exe push -source http://teamcity:8111/guestAuth/app/nuget/v1/FeedService.svc/ .\MySuperPackage.1.0.0.0.nupkg

I get this:

WARNING: No API Key was provided and no API Key could be found for 'http://teamcity:8111/guestAuth/app/nuget/v1/FeedService.svc/'. To save an API Key for a source use the 'setApiKey' command.
Pushing MySuperPackage.1.0.0.0 to 'http://teamcity:8111/guestAuth/app/nuget/v1/FeedService.svc/'...
Failed to process request. 'Method Not Allowed'.
The remote server returned an error: (405) Method Not Allowed..

I realise that a workaround is to temporarily create a build configuration that creates the package as an artifact, but feels a bit stupid...

With Kind Regards

Snorre Garmann

2 comments
Comment actions Permalink

Hi

I'm having the exact same problem. I even have an API key, so I'm not getting the "No API Key was provided" error.
However, it's asking for a user/pass and neither Active Directory users nor TeamCity users seems to work.
And on the guest authentication, it's giving me the same "Method Not Allowed" error as you are getting.

Any tips would be most helpful.

Regards,
Gunnar

0

Please sign in to leave a comment.