| gerrit ls-projects |
| ================== |
| |
| NAME |
| ---- |
| gerrit ls-projects - List projects visible to caller |
| |
| SYNOPSIS |
| -------- |
| [verse] |
| 'ssh' -p <port> <host> 'gerrit ls-projects' [\--show-branch <BRANCH>] |
| |
| DESCRIPTION |
| ----------- |
| 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. |
| |
| ACCESS |
| ------ |
| Any user who has configured an SSH key. |
| |
| SCRIPTING |
| --------- |
| This command is intended to be used in scripts. |
| |
| OPTIONS |
| ------- |
| \--show-branch:: |
| \-b:: |
| Name of the branch for which the command will display the sha of each project. |
| |
| \--tree:: |
| \-t:: |
| Displays project inheritance in a tree-like format. |
| This option does not work together with the show-branch option. |
| |
| EXAMPLES |
| -------- |
| |
| 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 |
| ==== |
| |
| SEE ALSO |
| -------- |
| |
| * link:access-control.html[Access Controls] |
| |
| GERRIT |
| ------ |
| Part of link:index.html[Gerrit Code Review] |