| Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 1 | gerrit ls-projects |
| 2 | ================== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | gerrit ls-projects - List projects visible to caller |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| Nico Sallembien | 0d6312d | 2010-03-15 14:48:44 -0700 | [diff] [blame^] | 11 | 'ssh' -p <port> <host> 'gerrit ls-projects' [\--show-branch <BRANCH>] |
| Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | Displays the list of project names, one per line, that the |
| 16 | calling user account has been granted 'READ' access to. |
| 17 | |
| 18 | If the caller is a member of the privileged 'Administrators' |
| 19 | group, all projects are listed. |
| 20 | |
| 21 | ACCESS |
| 22 | ------ |
| 23 | Any user who has configured an SSH key. |
| 24 | |
| 25 | SCRIPTING |
| 26 | --------- |
| 27 | This command is intended to be used in scripts. |
| 28 | |
| Nico Sallembien | 0d6312d | 2010-03-15 14:48:44 -0700 | [diff] [blame^] | 29 | OPTIONS |
| 30 | ------- |
| 31 | \--show-branch:: |
| 32 | \-b:: |
| 33 | Name of the branch for which the command will display the sha of each project. |
| 34 | |
| Shawn O. Pearce | 4016a93 | 2009-05-28 15:12:40 -0700 | [diff] [blame] | 35 | EXAMPLES |
| 36 | -------- |
| 37 | |
| 38 | List visible projects: |
| 39 | ===== |
| 40 | $ ssh -p 29418 review.example.com gerrit ls-projects |
| 41 | tools/gerrit |
| 42 | tools/gwtorm |
| 43 | ===== |
| 44 | |
| 45 | Clone any project visible to the user: |
| 46 | ==== |
| 47 | for p in `ssh -p 29418 review.example.com gerrit ls-projects` |
| 48 | do |
| 49 | mkdir -p `dirname "$p"` |
| 50 | git clone --bare "ssh://review.example.com:29418/$p.git" "$p.git" |
| 51 | done |
| 52 | ==== |
| 53 | |
| 54 | SEE ALSO |
| 55 | -------- |
| 56 | |
| 57 | * link:access-control.html[Access Controls] |
| Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 58 | |
| 59 | GERRIT |
| 60 | ------ |
| 61 | Part of link:index.html[Gerrit Code Review] |