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