Import a JFrog CLI server configuration

jf config import creates or updates a local server entry from a Config Token produced by jf config export. Import is commonly used to replicate a colleague’s or CI-generated configuration on a new machine without re-entering every flag by hand.

Prerequisites: JFrog CLI must be installed and available as jf. You need a Config Token from an existing configuration; generate one with jf config export as described in jf config export.

This topic covers:

Synopsis

jf config import <config-token>

Aliases: jf c im

Where:

  • <config-token>: The full base64 token string printed by jf config export.

Arguments

ArgumentRequiredDescription
config-tokenYesThe Config Token from jf config export

Examples

Import a Configuration

To import a server configuration from a Config Token:

  1. On a machine that already has the desired configuration, export a token (see jf config export):

    jf config export <server-id>

    Where:

    • <server-id>: The server ID to export.
  2. On the target machine, run:

    jf config import <config-token>

    Where:

    • <config-token>: Paste the complete token from the export command’s output. Do not truncate or add quotes unless your shell requires them.
  3. Confirm success. Expected output:

    [Info] Importing server ID 'my-server'

After a successful import, jf config show lists the new server.

What Is a Config Token?

A Config Token is a base64-encoded string produced by jf config export. It contains the server URL, authentication credentials, and other settings that were configured on the source server, encoded in a portable format. You can share it across machines or team members to quickly replicate a server configuration.

📘

Note

The token only captures what was present in the source configuration. If the source server was added without a URL or credentials (for example, a stub entry), the token will only contain the server ID. Importing such a token creates an incomplete server entry. Use jf config edit or jf config add to fill in the missing details after importing.

Important Notes

  • Security: Config Tokens contain sensitive credentials (access tokens or passwords). Treat them like passwords — do not log them, commit them to source control, or share them over unencrypted channels.
  • Overwrites existing servers without confirmation: If a server with the same server ID already exists in your local configuration, it will be silently replaced by the imported token. There is no prompt. Ensure you want to overwrite before running the command.
  • Default server is not preserved: The imported server is always added as a non-default server, regardless of whether it was the default on the source machine. After importing, run jf config use <server-id> to make it your default.
  • One-time import: The token does not expire, but credentials inside it might. If the access token in the Config Token has expired, the imported configuration will not work — you'll need to update it with jf config edit or re-add with jf config add.
  • Encryption: If the source configuration was encrypted with JFROG_CLI_ENCRYPTION_KEY, the Config Token contains the encrypted values. The importing machine does not need the encryption key to import, but it will store the configuration in its own encryption context.

Next Steps

To verify the server was added after import:

  1. Run:

    jf config show
  2. To set the imported server as your default, run:

    jf config use <server-id>

    Where:

    • <server-id>: The ID shown in the import success message or jf config show.

    For example:

    jf config use my-server

Troubleshooting

Command exits with no output and a non-zero exit code

This can happen if the local CLI configuration file is in an inconsistent state.

To narrow down the problem:

  1. Run jf config show to check the current state of your configuration.
  2. If no servers are listed despite having configured them previously, re-import the token or re-add the server with jf config add.
  3. If the problem persists, inspect ~/.jfrog/jfrog-cli.conf.v6 for corruption (the file should contain a valid JSON object with a "servers" array).

Imported server has no URL or credentials

The source server was exported without a URL or credentials configured. The token only contains the server ID. Use jf config edit <server-id> to add the missing URL and credentials.

Credentials in the imported configuration no longer work

The access token embedded in the Config Token may have expired. Update the configuration with jf config edit <server-id> or remove and re-add the server with jf config add.


What’s Next

After importing, set the server as your default with jf config use.