Add users to a group with jf rt group-add-users
Add existing users to an Artifactory group using the jf rt group-add-users command.
Add users to an existing group in Artifactory.
Prerequisites
Before running this command, ensure the following:
- A JFrog server is configured using
jf config add. You can also supply--urland authentication flags directly on each command. - You have admin privileges on the Artifactory instance.
- The target group already exists. Use
jf rt group-createto create one first. - All users to be added already exist in Artifactory. Use
jf rt users-createto create users.
Synopsis
jf rt group-add-users <group-name> <users-list> [options]
Aliases: rt gau
Arguments
This command takes the following arguments.
| Argument | Required | Description |
|---|---|---|
<group-name> | Yes | The name of the group |
<users-list> | Yes | Comma-separated list of usernames: user1,user2,... |
Options
This command supports the following options.
| Flag | Default | Description |
|---|---|---|
--access-token | — | JFrog access token |
--password | — | JFrog password (for authentication) |
--server-id | — | Server ID configured using the jf config command. Required if no default server is configured. |
--ssh-key-path | — | SSH key file path |
--ssh-passphrase | — | SSH key passphrase |
--url | — | JFrog Artifactory URL (example: https://acme.jfrog.io/artifactory). Required if --server-id is not provided. |
--user | — | JFrog username |
Examples
Add a Single User
To add one user to a group:
- Run:
jf rt group-add-users <group-name> <users-list>Where:
<group-name>— target group (see Arguments).<users-list>— one or more comma-separated usernames.
Full example:
jf rt group-add-users developers aliceExpected output:
[Info] Done adding user(s) to group developers.
Add Multiple Users
To add multiple users to a group:
- Run:
jf rt group-add-users <group-name> <users-list>Full example:
jf rt group-add-users developers alice,bob,charlieExpected output:
[Info] Done adding user(s) to group developers.
Display Command Help
To view command help:
- Run:
jf rt group-add-users --helpImportant Notes
- Requires admin privileges on the Artifactory instance.
- Users must already exist in Artifactory before running this command. If one or more usernames do not exist, the command returns a
404 Not Founderror with no indication of which user was not found. Create missing users first withjf rt users-create, then retry. To confirm all users were added successfully, check group membership in the Artifactory UI (Administration > Identity and Access > Groups). - Adding users to a group does not change their existing group memberships — it only adds them to the specified group.
- Users inherit all permissions assigned to the group's permission targets immediately.
Frequently Asked Questions
FAQs
Q: How do I add users to an Artifactory group?
A: Run jf rt group-add-users <group-name> <users-list> with a comma-separated list of usernames. See Add a Single User and Add Multiple Users for examples.
Q: What happens if I add a username that doesn't exist?
A: The command returns a 404 Not Found error without indicating which user was not found. Create missing users first with jf rt users-create, then retry.
Q: What do I need before running jf rt group-add-users?
A: Admin privileges on the Artifactory instance, an existing target group, and users that already exist in Artifactory. See Prerequisites.
Q: Does adding users to a group remove them from other groups?
A: No. Adding users to a group only adds them to that group — it does not change their existing group memberships.
Q: Do users get the group's permissions right away?
A: Yes. Users inherit all permissions assigned to the group's permission targets immediately after being added.
Related Topics
- Permission Targets
- Create an Artifactory Group with jf rt group-create
- Delete an Artifactory Group with jf rt group-delete
- Group Management
Updated 3 days ago
What’s Next
Next, assign permissions to the group.
