When to Enable Force Authentication in a NuGet Repository Configuration

When to Enable Force Authentication in a NuGet Repository Configuration

AuthorFullName__c
Batel Tova
articleNumber
000004251
ft:sourceType
Salesforce
FirstPublishedDate
2018-11-20T15:12:51Z
lastModifiedDate
2024-03-10T07:44:57Z
VersionNumber
5

When you’re working with NuGet repositories and the Allow Anonymous Access option is enabled, you’ll need to configure permissions for the NuGet repository. This means you’ll have to:

  1. Enable the Force Authentication option in the repository configuration. When this is done, Artifactory will ask the client for credentials and will allow downloads according to the permissions you grant. 

  2. Thereafter, you’ll configure the Force Authentication.

  3. Then, add your username and the password to the NuGet client configuration, adding your credentials using the following command:

$ nuget sources update -Name <source name> -UserName <your user name> -Password <your password> , for example:

$ nuget sources update -Name Artifactory -UserName admin -Password password

More information about Anonymous Access to NuGet Repositories is available HERE.