Create a user in Artifactory

Create a user in Artifactory

Create a new user in Artifactory with username, password, and email using jf rt user-create.

πŸ“˜

Prerequisites

  • JFrog CLI installed β€” see the install guide
  • A configured server (jf config add) or an Artifactory URL and admin access token to pass inline
  • Admin privileges on the target Artifactory instance

Synopsis

jf rt user-create <username> <user-password> <email> [options]

Aliases: none

Arguments

ArgumentRequiredDescription
<username>YesUsername for the new user
<user-password>YesLogin password for the new user (not the CLI's own authentication password)
<email>YesEmail address for the new user

Options

FlagDefaultDescription
--access-tokenβ€”JFrog access token
--adminfalseSet to true to create an admin user
--passwordβ€”JFrog password (for authentication)
--replacefalseSet to true to replace existing users or groups
--server-idβ€”Server ID configured using jf config
--ssh-key-pathβ€”SSH key file path
--ssh-passphraseβ€”SSH key passphrase
--urlβ€”JFrog Artifactory URL (example: https://acme.jfrog.io/artifactory)
--userβ€”JFrog username
--users-groupsβ€”Comma-separated list of groups for the new user to join. Groups must already exist in Artifactory.

Examples

Help

To view command help:

  1. Run:
jf rt user-create --help

Expected output: CLI prints the command synopsis, arguments, and all available flags.


Basic Usage

To create a user:

  1. If you use a pre-configured server (recommended β€” avoids exposing the token in shell history), run:
jf rt user-create <username> <user-password> <email> --server-id=<server-id>
  1. If you use inline credentials instead, run:
jf rt user-create <username> <user-password> <email> --url=<artifactory-url> --access-token=<Token>

Where:

  • <username>, <user-password>, and <email> β€” values for the new user (see Arguments).
  • <server-id> β€” server ID from jf config.
  • <artifactory-url> β€” base Artifactory URL.
  • <Token> β€” admin access token (do not paste real tokens into shared history).

Full examples:

jf rt user-create jdoe 'P@ssw0rd!' [email protected] --server-id=acme
jf rt user-create jdoe 'P@ssw0rd!' [email protected] --url=https://acme.jfrog.io/artifactory --access-token=<Token>

Expected output:

[Info] Creating user <username>...

A silent exit 0 with no error message means the user was created successfully.


Create User with Groups

πŸ“˜

Note

The groups specified in --users-groups must already exist in Artifactory. Use jf rt group-create to create them first.

To create a user and assign groups:

  1. Run:
jf rt user-create <username> <user-password> <email> --users-groups <users-groups> --server-id=<server-id>

Where:

  • <users-groups> β€” comma-separated list of existing group names (no spaces).

Full example:

jf rt user-create jdoe 'P@ssw0rd!' [email protected] --users-groups developers,readers --server-id=acme

Expected output:

[Info] Creating user <username>...

Create Admin User

To create an admin user:

  1. Run:
jf rt user-create <username> <user-password> <email> --admin --server-id=<server-id>

Full example:

jf rt user-create admin-user 'P@ssw0rd!' [email protected] --admin --server-id=acme

Expected output:

[Info] Creating user <username>...

Overwrite an Existing User

Use --replace to reset a user's password, email, or group membership:

To replace an existing user:

  1. Run:
jf rt user-create <username> <new-user-password> <new-email> --replace --server-id=<server-id>

Full example:

jf rt user-create jdoe 'NewSecret!' [email protected] --replace --server-id=acme

Expected output:

[Info] Creating user <username>...

When to Use

Use jf rt user-create to create a single user in Artifactory. For bulk user provisioning, use jf rt users-create with a CSV file instead.

Common scenarios:

  • Service accounts: Create dedicated service accounts for CI/CD pipelines
  • Testing: Create temporary users for integration testing (delete them after with jf rt users-delete)
  • Automation: Part of an onboarding script that creates a user, adds them to groups, and sets permissions

Important Notes

  • Requires admin privileges on the Artifactory instance.
  • <user-password> is the new user's login password. The --password flag in Options is a separate credential used to authenticate the CLI itself to Artifactory β€” do not confuse the two.
  • Use --replace to overwrite an existing user with the same username (see the Overwrite an Existing User example above).
  • Passwords are sent over HTTPS. Ensure your Artifactory instance uses TLS.


What’s Next

To provision users at scale, see jf rt users-create.