Create a user in Artifactory

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

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

📘

Note

Prerequisites:

  • JFrog CLI installed — see the JFrog CLI 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-tokenJFrog access token
--adminfalseSet to true to create an admin user
--passwordJFrog password (for authentication)
--replacefalseSet to true to replace existing users or groups
--server-idServer ID configured using jf config
--ssh-key-pathSSH key file path
--ssh-passphraseSSH key passphrase
--urlJFrog Artifactory URL (example: https://acme.jfrog.io/artifactory)
--userJFrog username
--users-groupsComma-separated list of groups for the new user to join. Groups must already exist in Artifactory.

Examples

Help

To view command help:

  • Run:
jf rt user-create --help

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


Basic Usage

To create a user:

  • Run the command for your authentication method:
    • If you use a pre-configured server (recommended — avoids exposing the token in shell history):

      jf rt user-create <username> <user-password> <email> --server-id=<server-id>
    • If you use inline credentials instead:

      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:

  • 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:

  • 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:

  • 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).
  • Passwords are sent over HTTPS. Ensure your Artifactory instance uses TLS.

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: How do I create a single user in Artifactory?

A: Run jf rt user-create <username> <user-password> <email> with either a pre-configured server ID or an inline URL and access token. See Basic Usage for both forms.

Q: What is the difference between jf rt user-create and jf rt users-create?

A: jf rt user-create creates one user at a time from command-line arguments, while jf rt users-create provisions multiple users in bulk from a CSV file.

Q: What happens if I create a user with a username that already exists?

A: Use --replace to overwrite the existing user's password, email, or group membership. See Overwrite an Existing User.

Q: What permissions do I need to create a user?

A: You need admin privileges on the target Artifactory instance. See the prerequisites in this page's introduction.

Q: Can I add a new user to existing groups when creating them?

A: Yes. Pass --users-groups with a comma-separated list of group names that already exist in Artifactory. See Create User with Groups.

Related Topics



What’s Next

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

Did this page help you?