Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cli-ref-sources.md #3380

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/reference/cli-reference/cli-ref-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ where `<operation>` is one of *List, Add, Remove, Enable, Disable,* or *Update*,
- **`-Password`**

Specifies the password for authenticating with the source.

> [!NOTE]
> When using an Azure DevOps Artifacts NuGet feed, this value should be set to a Personal Access Token (PAT) that is set with Read&Write under Packaging.
> For information about provisioning Azure DevOps Personal Access Tokens, please review [Azure DevOps - Use personal access tokens](/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate)

> [!NOTE]
> Be aware that encrypted passwords are only supported on Windows.
Expand All @@ -76,6 +80,9 @@ where `<operation>` is one of *List, Add, Remove, Enable, Disable,* or *Update*,

Specifies the user name for authenticating with the source.

> [!NOTE]
> When using an Azure DevOps Artifacts NuGet feed, this value is ignored in favor of the Personal Access Toek provided in the Password parameter.

- **`-ValidAuthenticationTypes`**

Comma-separated list of valid authentication types for this source. By default, all authentication types are valid. Example: `basic,negotiate`.
Expand Down Expand Up @@ -107,5 +114,7 @@ nuget sources Enable -Name "nuget.org"

nuget sources add -name foo.bar -source C:\NuGet\local -username foo -password bar -StorePasswordInClearText -configfile %AppData%\NuGet\my.config

nuget sources add -name MyAzureDevOpsSource -source "https://pkgs.dev.azure.com/yourorgname/yourprojectname/_packaging/yourfeedname/nuget/v3/index.json" -username foo -password <Personal Access Token>

nuget sources Update -Name "nuget.org" -ProtocolVersion 3
```