jf config add

Add a server configuration to the JFrog CLI.

Synopsis

jf config add [server-id] [options]

Aliases: none

Arguments

ArgumentRequiredDescription
server-idNoUnique ID for this server configuration

Options

FlagDefaultDescription
--interactivetrueSet to false to skip interactive prompts
--urlJFrog Platform URL
--artifactory-urlArtifactory URL
--distribution-urlDistribution URL
--xray-urlXray URL
--mission-control-urlMission Control URL
--pipelines-urlPipelines URL
--userJFrog username
--passwordJFrog password or API key
--access-tokenJFrog access token
--ssh-key-pathPath to SSH key file
--ssh-passphraseSSH key passphrase
--client-cert-pathPath to client certificate PEM file
--client-cert-key-pathPath to client certificate key PEM file
--basic-auth-onlyfalseUse basic authentication only
--insecure-tlsfalseSkip TLS certificate verification
--overwritefalseOverwrite existing server configuration with the same ID
--enc-passwordtrueStore password encrypted
--password-stdinfalseRead password from standard input
--access-token-stdinfalseRead access token from standard input
--oidc-provider-nameOIDC provider name for token exchange
--oidc-token-idOIDC token ID
--oidc-audienceOIDC audience
--oidc-provider-typeOIDC provider type
--application-keyJFrog application key
--disable-token-refreshfalseDisable 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=false

Non-Interactive Add with Username and Password

jf config add <server-id> --url=<your-server-url> --user=<username> --password=<password> --interactive=false

Important Notes

  • Server ID restrictions: The server ID cannot be delete, use, show, or clear — these are reserved words. Use descriptive names like my-server, prod-artifactory, or ci-server.
  • Encryption: If JFROG_CLI_ENCRYPTION_KEY is 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-only to disable this behavior if needed for external tool compatibility. Use --disable-token-refresh to 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-stdin or --access-token-stdin to pipe credentials instead of passing them as command-line arguments (which may appear in process listings).


What’s Next

After adding a server, verify your configuration with jf config show.