divekit access grant

Give users a role on the repositories of a distribution

Synopsis

Give one or more GitLab users a role on the repositories of a distribution.

By default the users get the reporter role on every work and evaluation repository. Reporter can read and clone a repository but not push to it. Choose another role with –access-level and narrow the repositories with –target and –uuid. A user who already is a direct member of a repository gets the new role there, also when it is lower than before.

Access Levels

  guest       Can see the project, but not its code
  reporter    Can clone and view issues
  developer   Can push to non-protected branches
  maintainer  Full access including protected branches and settings

Each user is looked up before the plan is shown, so a mistyped name stops
before anything changes. The plan needs confirmation; --dry-run stops after the
plan and --yes confirms without a prompt. Results that failed are listed with
the --uuid values that repeat the change for them.

Usage

divekit access grant <username>... [flags]

Examples

# Give a supervisor read access to everything
divekit access grant -d ST2M4 manuel

# Give two tutors developer access to the work repositories only
divekit access grant -d ST2M4 maren lucas --access-level developer --target work

# Preview the change for one repository
divekit access grant -d ST2M4 maren --uuid 123e4567-e89b-12d3-a456-426614174000 --dry-run

Flags

--access-level string   Role to give: guest|reporter|developer|maintainer (default "reporter")
  -d, --distribution string   Distribution name
  -n, --dry-run               Show the plan without changing anything
  -r, --remote string         Remote repository URL (e.g. GitLab instance)
      --target strings        Only repositories of this target, for example work or eval (repeatable)
  -t, --token string          GitLab token or token file path (file:///...)
      --uuid strings          Only repositories with these UUIDs (repeatable or comma-separated)

Inherited Flags

-l, --loglevel string   log level (debug, info, warn, error, fatal) (default "info")
      --no-index          skip project index update
      --non-interactive   run in non-interactive mode (fails if interactive input is required)
  -y, --yes               assume yes/default for all prompts (non-interactive with automatic defaults)

Parent Command