jf config use
Set the active server by its ID. Subsequent commands use this server unless overridden.
Synopsis
jf config use <server-id>
Aliases: none
Arguments
| Argument | Required | Description |
|---|---|---|
server-id | Yes | The server ID to set as active |
Examples
Set the Active Server
jf config use <server-id>When to Use
Use jf config use when you have multiple server configurations (e.g., dev-server, staging-server, prod-server) and want to switch the default for all subsequent commands.
Shortcut: If you only need to override the server for a single command, use the
--server-idflag instead of switching the active server:jf rt ping --server-id=prod-serverOr set the
JFROG_CLI_SERVER_IDenvironment variable for a session:export JFROG_CLI_SERVER_ID=prod-server jf rt ping # Uses prod-server without changing the active config
Important Notes
- The active server setting persists across sessions — it is stored in the configuration file.
- Using
--server-idon a command always overrides the active server for that command only. - The
JFROG_CLI_SERVER_IDenvironment variable overrides the active server for the entire session.
Updated about 1 month ago
