artifactoryjfrog-cli

JFrog CLI: How can I set or delete a property whose name or value contains equal signs, commas or semicolons?


From Setting Properties on Files, I see that the JFrog CLI jf rt set-props command uses an equal sign to specify a property name/value pair, semicolons to separate multiple name/value pairs, and commas to separate multiple values within a name/value pair:

Files properties The list of properties, in the form of key1=value1;key2=value2,..., to be set on the matching artifacts.

So how do I set properties whose names or values contain equal signs, semicolons, or commas?

Similarly, the jf rt delete-props command uses commas to separate property names. So how do I delete properties whose names contain commas?


Solution

  • Only properties with special characters in their values can be set. Artifactory does not allow special characters in property names:

    The following special characters are forbidden in the key field: )(}{][*+^$/~`!@#%&<>;=,±§ and the Space character.

    Use the \ escape character to set a property with a special character in the value. As an example:

    jf rt set-props "name=val\=ue"
    

    Read more about it: