Set-NugetCredentials
Sets the specified NuGet credentials in the NuGet.config
Syntax
Set-NugetCredentials [-Username] <String> [-Password] <String> [-Source] <String> [[-SourceName] <String>] [<CommonParameters>]
Description
Adds or updates the specified credentials for the specified source in the NuGet.config If the source doesn't exist yet in the NuGet.config it will be created.
Parameters
-Username <String>
The username to set.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 1 | true | false | false |
-Password <String>
The password to set.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 2 | true | false | false |
-Source <String>
The source for which the username and password should be set.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 3 | true | false | false |
-SourceName <String>
The name of the source in the NuGet.config.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 4 | false | Unic TeamCity | false | false |
Examples
-------------------------- EXAMPLE 1 --------------------------
Set-NuGetCredentials -Username bob.thebuilder -Password W3ndy -Source https://teamcity.unic.com/some/endpoint