Create users from a CSV with jf rt users-create

Create Artifactory users in bulk from a CSV file with JFrog CLI.

Create new users in Artifactory from a CSV file with usernames, passwords, and emails.

Synopsis

jf rt users-create --csv <path> [options]

Aliases: rt uc

Arguments

The command takes no positional arguments; use the flags below to provide input.

ArgumentRequiredDescription
No positional arguments. Use --csv for the file path

Options

The following table lists the flags supported by jf rt users-create.

FlagRequiredDefaultDescription
--access-tokenNoJFrog access token
--csvYesPath to a CSV file. First row must be headers: username, password, email
--passwordNoJFrog password (for authentication)
--replaceNofalseSet to true to overwrite existing users' password and email instead of failing. See Replace Existing Users for what happens without this flag.
--server-idNoServer ID configured using the jf config command
--ssh-key-pathNoSSH key file path
--ssh-passphraseNoSSH key passphrase
--urlNoJFrog Artifactory URL (example: https://acme.jfrog.io/artifactory)
--userNoJFrog username
--users-groupsNoComma-separated list of groups for the new users to join. Groups must already exist in Artifactory before running this command
--formatNoOutput format: json only. When omitted, produces no output (backward-compatible). See jf rt output format.

Examples

Create Users from a CSV File

To create users from a CSV file:

  1. Create a CSV file with the user details (see CSV Format):
username,password,email
alice,Secret1!,[email protected]
bob,Secret2!,[email protected]
  1. Save it as users.csv, then run:
jf rt users-create --csv <path>

Where:

  • <path> — path to your CSV file (for example ./users.csv).

Full example:

jf rt users-create --csv ./users.csv

Expected output:

[Info] Creating user alice...
[Info] Creating user bob...
[Info] Done creating 2 users.

Create Users with Group Assignment

The groups developers and readers must already exist in Artifactory before running this command.

To create users from a CSV and assign groups:

  1. Use a CSV file in the format described in CSV Format.
  2. Run:
jf rt users-create --csv <path> --users-groups <group-list>

Where:

  • <path> — path to the CSV file.
  • <group-list> — comma-separated Artifactory group names (no spaces), for example developers,readers.

Full example:

jf rt users-create --csv ./users.csv --users-groups developers,readers

Expected output:

[Info] Creating user alice...
[Info] Creating user bob...
[Info] Done creating 2 users.

Replace Existing Users

Use --replace when users in the CSV already exist and you want to overwrite their password and email. Without this flag, the command stops at the first user that already exists — it does not skip that user and continue with the rest.

To replace existing users from a CSV:

  • Run:
jf rt users-create --csv <path> --replace

Where:

  • <path> — path to the CSV file.

Full example:

jf rt users-create --csv ./users.csv --replace

Expected output:

[Info] Creating user alice...
[Info] Creating user bob...
[Info] Done creating 2 users.

CSV Format

The CSV file must contain these headers in the first row: username, password, email.

username,password,email
alice,secret1,[email protected]
bob,secret2,[email protected]

The CLI also accepts two optional per-user columns, admin and groups (username,password,email,admin,groups), letting you grant admin privileges or assign different groups to individual users within the same CSV. These are independent of the --users-groups flag, which applies the same group list to every user in the file.

When to Use

Use jf rt users-create for bulk user provisioning — for example, when onboarding an entire team or migrating users from another system. Prepare a CSV file and run a single command.

Typical onboarding workflow:

To onboard a new team with groups and permissions:

  1. Create the groups (skip if they already exist). See jf rt group-create for details.
jf rt group-create developers
jf rt group-create readers
  1. Create users and assign them to the groups:
jf rt users-create --csv ./new-team.csv --users-groups developers,readers
  1. Set up a permission target for the team. Generate a template with jf rt permission-target-template, fill in the repositories and actions, then apply it:
jf rt permission-target-update ./team-permissions.json

Troubleshooting

The following table lists common errors and how to resolve them.

ErrorLikely CauseResolution
401 Token failed verificationExpired or missing access tokenRe-authenticate: run jf config add to reconfigure your server
CSV must include headersFirst row is missing or misspelledEnsure the first row is exactly username,password,email
403 ForbiddenInsufficient privilegesConfirm your account has Admin rights on the Artifactory instance
Users created but not added to groupGroup name does not existCreate the group first with jf rt group-create <group-name>, then re-run
user '<name>' already existsA user in the CSV already exists and --replace was not setSee Replace Existing Users. Add --replace, or remove/reorder already-existing users, then re-run
👍

Tip

If the CLI reports a server-side error, it also prints a Trace ID (for example, [Info] Trace ID for JFrog Platform logs: abc123). Include this ID when contacting JFrog Support to speed up diagnosis.

Important Notes

  • The CSV file must have headers: username, password, email in the first row.
  • Requires admin privileges on the Artifactory instance.
  • Users are created one row at a time, in CSV order, and processing stops at the first error (see Replace Existing Users for the already-exists case). Re-running the command after fixing the issue will attempt to create the remaining users again — already-created users from the earlier run will then also need --replace, or should be removed from the CSV first.
  • Passwords in the CSV are sent over HTTPS. Do not commit CSV files with real passwords to version control.
  • Restrict the file's permissions before use to prevent other users on the system from reading plaintext passwords:
    chmod 600 users.csv

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: How do I create multiple Artifactory users at once with JFrog CLI?

A: Create a CSV file with username, password, and email headers, then run jf rt users-create --csv <path>. See Create Users from a CSV File for the full example.

Q: What happens if a user in my CSV already exists?

A: The command stops at the first existing user and does not create the remaining users, unless you pass --replace. See Replace Existing Users.

Q: What permissions do I need to run jf rt users-create?

A: You need admin privileges on the Artifactory instance. See Important Notes for other requirements.

Q: Can I assign new users to existing groups in the same command?

A: Yes. Add --users-groups <group-list> with a comma-separated list of group names that already exist in Artifactory. See Create Users with Group Assignment.

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

A: jf rt users-create bulk-creates multiple users from a CSV file. jf rt user-create (singular) creates one user at a time from command-line arguments.

Related Topics



What’s Next

To remove users, see jf rt users-delete.

Did this page help you?