gerrit ls-projects - List projects visible to caller
Displays the list of project names, one per line, that the calling user account has been granted READ access to.
If the caller is a member of the privileged Administrators group, all projects are listed.
Any user who has configured an SSH key.
This command is intended to be used in scripts.
Branch for which the command will display the sha of each project. The command may have multiple --show-branch parameters, in this case sha will be shown for each of the branches. If the user does not have READ access to some branch or the branch does not exist then stub (40 - symbols) is shown. If the user does not have access to any branch in the project then the whole project is not shown.
Allows listing of projects together with their respective description.
Line-feeds are escaped to allow ls-project to keep the "one project per line"-style.
Displays project inheritance in a tree-like format. This option does not work together with the show-branch option.
Display only projects of the specified type. If not specified, defaults to code. Supported types:
Display all projects that are accessible by the calling user account. Besides the projects that the calling user account has been granted READ access to, this includes all projects that are owned by the calling user account (even if for these projects the READ access right is not assigned to the calling user account).
Any project likely to contain user files.
Projects created with the --permissions-only flag.
Any type of project.
List visible projects:
$ ssh -p 29418 review.example.com gerrit ls-projects tools/gerrit tools/gwtorm
Clone any project visible to the user:
for p in `ssh -p 29418 review.example.com gerrit ls-projects` do mkdir -p `dirname "$p"` git clone --bare "ssh://review.example.com:29418/$p.git" "$p.git" done
Part of Gerrit Code Review