ARTIFACTORY: Configuring Multiple Include and Exclude Patterns in Artifactory YAML Repository Configuration

Products
Frog_Artifactory
Content Type
Installation_Setup
AuthorFullName__c
Abhishek Neema
articleNumber
000007063
FirstPublishedDate
2026-07-16T06:59:28Z
lastModifiedDate
2026-07-16

ARTIFACTORY: Configuring Multiple Include and Exclude Patterns in Artifactory YAML Repository Configuration

Introduction 

When provisioning repositories in JFrog Artifactory using the Artifactory YAML Configuration method, the Includes Patterns and Excludes Patterns fields are used to control which artifact paths are allowed or blocked for a repository. 
This article will walk you through configuring multiple include and exclude patterns for a repository using the Artifactory YAML configuration method, including a working example and the steps to apply it.

Resolution 
In the Artifactory YAML configuration, both Include Patterns and Exclude Patterns accept a list of Ant-style patterns separated by commas (,). To specify multiple patterns, simply list them in a single comma-separated string. No additional syntax (such as arrays or repeated keys) is required.

Step-by-Step Instructions

1. Create or update your YAML configuration file with the repository definition. It is always suggested to take a backup of the existing YAML to ensure a way to roll back in case of an issue. In the example below, a local generic repository is configured with three exclude patterns and an include-all pattern:
localRepositories:                          # Local repositories configuration
  test_repo:                                # The local repository name (key)
    type: generic                           # The package type
    checksumPolicyType: client-checksums    # Determines how Artifactory behaves when a client checksum is provided
    description: "test repository"
    excludesPattern: "*.tmp,*.log,*.txt"    # Multiple exclude patterns, comma-separated
    includesPattern: "**/*"                 # Include-all pattern

2. Apply the configuration by sending it to the Artifactory configuration endpoint with a PATCH request. The YAML file is merged into the existing configuration:
curl -u <username>:<password> -X PATCH "https://<JFROG-URL>/artifactory/api/system/configuration" -H "Content-Type: application/yaml" -T configuration_test.yaml

5 changes to config merged successfully

3. Verify the result in the Artifactory UI by navigating to Administration > Repositories, selecting the repository, and confirming that all of the include and exclude patterns appear in the Include Patterns and Exclude Patterns fields.


Conclusion 
To configure multiple include or exclude patterns for a repository using the Artifactory YAML configuration method, list the patterns as a single comma-separated string in the includesPattern and excludesPattern fields. After applying the configuration via a PATCH request to /api/system/configuration, verify that the patterns are reflected in the repository settings.

For further reference, see the following JFrog documentation:
Repositories Configurations in Artifactory YAML