Skip to content

hubcli group member add

Adds a user or group as a member of a group.

The command has the following format:

hubcli group member add [flags] group-name

flags
One or more optional flags that provide additional control over execution of the command.
group-name
The name of the group to which specified users and groups are added.

The following flags are available:

-c string or --connection string
Specifies the name of the connection to use. If you do not specify this option, then the default connection is used. If there is no default connection, then you must specify a connection. The first connection created for the Altair SLC Hub instance is set by default as the default Altair SLC Hub instance, but a different default connection can be set using the hubcli connection use command.
--group group-name
Specifies a group to add as a member of the group specified by group-name. Repeat this flag to add multiple groups.
--debug
Enables debug logging.
-h or --help
Returns help information for this command.
--user username
Specifies a user to add as a member of the group specified by group-name. Repeat this flag to add multiple users.

Examples

The following command adds users jsmith and mjones as direct members of the BatchJobUsers group:

hubcli group member add BatchJobUsers --user jsmith --user mjones
Changes applied successfully

The following command adds the group developers as a direct member of the BatchJobUsers group:

hubcli group member add BatchJobUsers --group developers
Changes applied successfully

Users and groups can be added in a single command:

hubcli group member add BatchJobUsers --user jsmith --group developers
Changes applied successfully

Running hubcli group member list BatchJobUsers --direct confirms the members were added:

 NAME          MEMBER TYPE  MEMBERSHIP TYPE
 John Smith    User         Direct
 developers    Group        Direct