provide credentials in nuget command line parameters

前端 未结 2 373
猫巷女王i
猫巷女王i 2021-02-04 00:56

We have an nuget server hosted in azure that only allow certain people to create packages.

If I run nuget command line, I get asked to provide username and password. Is t

2条回答
  •  生来不讨喜
    2021-02-04 01:31

    You have to change the NuGet.config you use. That is possible from the command line:

    nuget sources add -Name "MyExample" -Source "XXX" -username "Y" -password "Z"
    

    The password will be stored encrypted in the config file and can only be decrypted in the same user context as it was encrypted.

提交回复
热议问题