Passing nuget.exe restore username and password

Viewed 226

I'm using the nuget command line to restore packages for a solution. The packages come from an internal nuget mirror which requires authentication.

I found documentation on setting the -source parameter and noticed the -username and -password parameters. It seems the last two parameters are only applicable for adding a source to a config file.

Does anyone know if there is in fact a way of just passing the username and password for a source via the command line only i.e negating the need for a config altogether?

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source

Thanks!

1 Answers

As far as I can tell, according to the docs, there is currently no way to do this. I agree that it would be a really helpful feature.

Related