Edit a JFrog CLI server configuration

jf config edit updates an existing server entry in the CLI configuration. In a normal terminal, the command opens interactive prompts so you can change fields safely. In CI/CD or scripts, you can pass --interactive=false and flags for only the values you want to change — with important caveats about fields that are cleared when not supplied.

Prerequisite: JFrog CLI is installed on your PATH, and at least one server is already configured. To list server IDs, use jf config show. To create a server, see jf config add.

🚧

Warning — data loss risk

When running non-interactively (either by passing --interactive=false or in any environment where $CI is set, since the CLI automatically disables interactive mode when $CI=true), any field you do not explicitly pass as a flag will be cleared and saved as empty. The command exits 0 with no error or warning. Always pass every field you want to preserve when running non-interactively, and verify results with jf config show <server-id> afterwards.

This topic covers:

Synopsis

jf config edit <server-id>

Aliases: jf c edit

Where:

  • <server-id>: The configured server ID to edit. Run jf config show to list IDs.

Arguments

ArgumentRequiredDescription
server-idYesThe server ID to edit. Run jf config show to list configured server IDs.

Options

FlagDefaultDescription
--urlJFrog Platform URL (for example, https://acme.jfrog.io)
--access-tokenJFrog Platform access token
--access-token-stdinfalseRead the access token from stdin instead of the flag value
--userJFrog Platform username
--passwordJFrog Platform password or API key
--password-stdinfalseRead the password from stdin instead of the flag value
--interactivetrue (auto false when $CI=true)Set to false to disable prompts and apply values from flags directly
--artifactory-urlOverride the Artifactory URL (for example, https://acme.jfrog.io/artifactory)
--distribution-urlOverride the Distribution URL
--xray-urlOverride the Xray URL
--pipelines-urlOverride the Pipelines URL
--mission-control-urlOverride the Mission Control URL
--ssh-key-pathPath to an SSH key file
--ssh-passphrasePassphrase for the SSH key
--client-cert-pathClient certificate file in PEM format
--client-cert-key-pathPrivate key for the client certificate in PEM format
--basic-auth-onlyfalseDisable automatic replacement of username/password with a refreshed access token
--enc-passwordtrueSet to false to skip encrypting the password via Artifactory's encryption API
--insecure-tlsfalseSkip TLS certificate verification (use with --enc-password=false in self-signed cert environments)
--disable-token-refreshfalseDisable automatic hourly refresh of the access token

Examples

Edit a Server Configuration

The CLI presents each field with the current value shown in brackets — press Enter to keep it, or type a new value.

To edit a server configuration interactively:

  1. Run the following command:

    jf config edit <server-id>

    Where:

    • <server-id>: The server ID to edit.

    For example:

    jf config edit myserver
  2. Complete the prompts. Example session (current values shown in brackets; pressing Enter keeps them):

    JFrog Platform URL [https://mycompany.jfrog.io/]:
    User [admin]:
    Password:
    Access Token [***]:
    SSH Key File Path []:
    Client Certificate File Path []:
    Client Certificate Key Path []:
  3. Confirm the update. After all prompts complete, the CLI prints no output.

To verify your changes:

  • Run:

    jf config show <server-id>

    Where:

    • <server-id>: Same server you edited.

    For example:

    jf config show myserver

Non-Interactive Usage (CI/CD)

Pass --interactive=false along with the flags for every field you want to retain. Only the fields you specify are written; all other fields are cleared, so always pass every field you need to keep.

To rotate an access token non-interactively:

  1. Run the following command, supplying every field you must preserve (including URL and new token):

    jf config edit <server-id> \
      --interactive=false \
      --url=<your-server-url> \
      --access-token=<Token>

    Where:

    • <server-id>: The server ID to edit.
    • <your-server-url>: JFrog Platform URL for this server.
    • <Token>: New access token. Do not use a sample value in real environments.

    For example:

    jf config edit myserver \
      --interactive=false \
      --url=https://mycompany.jfrog.io/ \
      --access-token=<Token>

To update the platform URL after a domain change:

  1. Run:

    jf config edit <server-id> \
      --interactive=false \
      --url=<new-platform-url> \
      --access-token=<Token>

    Where:

    • <server-id>: The server ID to edit.
    • <new-platform-url>: The new JFrog Platform base URL.
    • <Token>: Current valid access token.

    For example:

    jf config edit myserver \
      --interactive=false \
      --url=https://newdomain.jfrog.io/ \
      --access-token=<Token>
📘

Note

In CI/CD environments, $CI is typically set to true, which causes --interactive to default to false automatically. The same data-loss risk applies — always pass all required flags explicitly.

Replace a full configuration with add and overwrite

Alternatively, jf config add --overwrite --interactive=false replaces the entire configuration entry and is useful when you want to fully re-provision a server config from scratch.

To replace a server configuration using add and overwrite:

  1. Run:

    jf config add <server-id> \
      --url=<your-server-url> \
      --access-token=<Token> \
      --interactive=false \
      --overwrite

    Where:

    • <server-id>: Existing server ID to replace.
    • <your-server-url>: JFrog Platform URL.
    • <Token>: Access token for authentication.

    For example:

    jf config add myserver \
      --url=https://mycompany.jfrog.io/ \
      --access-token=<Token> \
      --interactive=false \
      --overwrite

When to Use

Use jf config edit when you need to update one or more fields in an existing server configuration — for example, rotating an access token or updating a URL after a domain change. It works in both interactive terminal sessions and non-interactive environments (CI/CD, scripts) when combined with --interactive=false and the relevant flags.

Use jf config add --overwrite instead when you want to fully replace an existing configuration entry from scratch rather than patch specific fields.

Important Notes

  • Non-interactive mode clears unspecified fields. When --interactive=false is set (or when $CI=true, which triggers non-interactive mode automatically), any field you do not pass as a flag is saved as empty. There is no warning. Always pass every field you want to keep, and verify with jf config show <server-id> afterwards.
  • $CI=true disables interactive mode automatically. In CI/CD pipelines where the CI environment variable is set, the command runs non-interactively by default — even without --interactive=false. This matches the behavior of jf config add.
  • Blank input clears the field (interactive mode). In interactive mode, pressing Enter without typing keeps the current value. Typing a blank value clears the field immediately — there is no undo.
  • No confirmation step. Changes are committed immediately after the final prompt (interactive) or after the command runs (non-interactive). There is no "save changes? (y/N)" prompt.
  • The command produces no success output. On success the command exits 0 silently. Run jf config show <server-id> to verify your changes.
  • Editing does not change the server ID. To rename a server, remove it with jf config remove and add a new one with jf config add.
  • The default server status is editable during the prompts. If you step through prompts on your default server, confirm the default field to avoid unintentionally changing it.
  • If you have JFROG_CLI_ENCRYPTION_KEY set, edited credentials are re-encrypted with the same key. If the key has changed since the server was originally configured, re-enter your credentials during the edit to ensure they are encrypted correctly.

What’s Next

After editing, verify your changes with jf config show.