provide credentials in nuget command line parameters

前端 未结 2 375
猫巷女王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:21

    Use PAT (Personal Access Token) as the password. Make sure that PAT has packaging read and write permission.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题