NuGet Authentication from Plugin

Topics: General
Jun 27, 2012 at 12:31 PM


Do you know we provide support of NuGet in TeamCity. There we have an option to make TeamCity implement a NuGet feed (via http or https). 

NuGet community grows. We start receiving feedback from users who use NuGet Feed behind http basic authentication. Hope you have related feedback too.

Recently, I decided to make TeamCity NuGet runners be aware of feed access credentials. There is a related issue for NuGet support in TeamCity:

I did a research and it turned out there is no chance to make NuGet.exe to avoid interactive credentials dialog. I wish I could provide feed credentials to NuGet before it started. I know how and I use plugins for NuGet. So if there is an API to provide credentials that would work for me. 

I did a research in that direction. Unfortunately I failed to make it work. I blogged all details here:

My goal is to make TeamCity be able to pre-set feed credentials. This would let uses to be able to hide some packages from public access. There are another cool features that could be done with credentials.

I have also created a number of issues to NuGet:,,

Jul 1, 2012 at 6:16 AM

SEO Expert

Oct 25, 2012 at 8:12 AM

This is indeed a blocking issue for quite a common use case (also check my experience trying to make this work on TFS Preview for instance).

This issue is also related:

Also, it's quite cumbersome to provide these credentials in the solution-level nuget.config as there is no tooling to support this. One can copy-paste... but the above issue explains it doesn't matter as these credentials don't seem to be picked up.

Some kind of API (plug-in, command line option, ...) should facilitate this.

I'd love to send a pull request which supports this, but I need to find time to do so :( I'd prefer the community not having to wait for me to do so :P

Nov 14, 2012 at 11:42 AM

Ran in to the same problem yesterday :(  Finally had to turn off the HTTP authentication and use the guest account with no authentication. Definitely not an ideal solution. My preference is a command line option to enter the feed credentials.

Nov 14, 2012 at 8:59 PM

We have fixed the issue #2749 that xavierdecoster mentioned. It will be included in the upcoming 2.2 release. Then if you set your credentials in the nuget.config file, it will work.