jf config add
Add a server configuration to the JFrog CLI.
Synopsis
jf config add [server-id] [options]
Aliases: none
Arguments
| Argument | Required | Description |
|---|---|---|
server-id | No | Unique ID for this server configuration |
Options
| Flag | Default | Description |
|---|---|---|
--interactive | true | Set to false to skip interactive prompts |
--url | — | JFrog Platform URL |
--artifactory-url | — | Artifactory URL |
--distribution-url | — | Distribution URL |
--xray-url | — | Xray URL |
--mission-control-url | — | Mission Control URL |
--pipelines-url | — | Pipelines URL |
--user | — | JFrog username |
--password | — | JFrog password or API key |
--access-token | — | JFrog access token |
--ssh-key-path | — | Path to SSH key file |
--ssh-passphrase | — | SSH key passphrase |
--client-cert-path | — | Path to client certificate PEM file |
--client-cert-key-path | — | Path to client certificate key PEM file |
--basic-auth-only | false | Use basic authentication only |
--insecure-tls | false | Skip TLS certificate verification |
--overwrite | false | Overwrite existing server configuration with the same ID |
--enc-password | true | Store password encrypted |
--password-stdin | false | Read password from standard input |
--access-token-stdin | false | Read access token from standard input |
--oidc-provider-name | — | OIDC provider name for token exchange |
--oidc-token-id | — | OIDC token ID |
--oidc-audience | — | OIDC audience |
--oidc-provider-type | — | OIDC provider type |
--application-key | — | JFrog application key |
--disable-token-refresh | false | Disable automatic token refresh |
Examples
Interactive Add
Add a server and follow the prompts:
jf config add <server-id>Non-Interactive Add with Access Token
jf config add <server-id> --url=<your-server-url> --access-token=<your-token> --interactive=falseNon-Interactive Add with Username and Password
jf config add <server-id> --url=<your-server-url> --user=<username> --password=<password> --interactive=falseImportant Notes
- Server ID restrictions: The server ID cannot be
delete,use,show, orclear— these are reserved words. Use descriptive names likemy-server,prod-artifactory, orci-server. - Encryption: If
JFROG_CLI_ENCRYPTION_KEYis set when you add a configuration, the credentials are encrypted. You must set the same key in every session that uses this configuration. If you lose the key, remove the config and re-add it. - Token refresh: By default, the CLI exchanges username/password for an access token and refreshes it automatically. Use
--basic-auth-onlyto disable this behavior if needed for external tool compatibility. Use--disable-token-refreshto prevent automatic token refresh. - Overwriting: If a server with the same ID already exists, the command fails unless you pass
--overwrite. - Password from stdin: For CI/CD security, use
--password-stdinor--access-token-stdinto pipe credentials instead of passing them as command-line arguments (which may appear in process listings).
Updated about 1 month ago
