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.
| Argument | Required | Description |
|---|---|---|
| — | — | No positional arguments. Use --csv for the file path |
Options
The following table lists the flags supported by jf rt users-create.
| Flag | Required | Default | Description |
|---|---|---|---|
--access-token | No | — | JFrog access token |
--csv | Yes | — | Path to a CSV file. First row must be headers: username, password, email |
--password | No | — | JFrog password (for authentication) |
--replace | No | false | Set to true to overwrite existing users' password and email instead of failing. See Replace Existing Users for what happens without this flag. |
--server-id | No | — | Server ID configured using the jf config command |
--ssh-key-path | No | — | SSH key file path |
--ssh-passphrase | No | — | SSH key passphrase |
--url | No | — | JFrog Artifactory URL (example: https://acme.jfrog.io/artifactory) |
--user | No | — | JFrog username |
--users-groups | No | — | Comma-separated list of groups for the new users to join. Groups must already exist in Artifactory before running this command |
--format | No | — | Output 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:
- Create a CSV file with the user details (see CSV Format):
username,password,email
alice,Secret1!,[email protected]
bob,Secret2!,[email protected]- 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.csvExpected 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:
- Use a CSV file in the format described in CSV Format.
- 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 exampledevelopers,readers.
Full example:
jf rt users-create --csv ./users.csv --users-groups developers,readersExpected 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> --replaceWhere:
<path>— path to the CSV file.
Full example:
jf rt users-create --csv ./users.csv --replaceExpected 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:
- 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- Create users and assign them to the groups:
jf rt users-create --csv ./new-team.csv --users-groups developers,readers- 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.jsonTroubleshooting
The following table lists common errors and how to resolve them.
| Error | Likely Cause | Resolution |
|---|---|---|
401 Token failed verification | Expired or missing access token | Re-authenticate: run jf config add to reconfigure your server |
CSV must include headers | First row is missing or misspelled | Ensure the first row is exactly username,password,email |
403 Forbidden | Insufficient privileges | Confirm your account has Admin rights on the Artifactory instance |
| Users created but not added to group | Group name does not exist | Create the group first with jf rt group-create <group-name>, then re-run |
user '<name>' already exists | A user in the CSV already exists and --replace was not set | See 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,emailin 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.
FAQs
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
- Delete Artifactory Users with jf rt users-delete
- Group Management
- Permission Targets in Artifactory
- jf rt Output Format
Updated 2 days ago
What’s Next
To remove users, see jf rt users-delete.
