1GIT-CVSSERVER(1)                  Git Manual                  GIT-CVSSERVER(1)
2
3
4

NAME

6       git-cvsserver - A CVS server emulator for git
7

SYNOPSIS

9       SSH:
10
11
12           export CVS_SERVER=git-cvsserver
13           cvs -d :ext:user@server/path/repo.git co <HEAD_name>
14       pserver (/etc/inetd.conf):
15
16
17           cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver
18       Usage:
19
20
21           git-cvsserver [options] [pserver|server] [<directory> ...]
22

OPTIONS

24       All these options obviously only make sense if enforced by the server
25       side. They have been implemented to resemble the git-daemon(1) options
26       as closely as possible.
27
28       --base-path <path>
29           Prepend path to requested CVSROOT
30
31       --strict-paths
32           Don´t allow recursing into subdirectories
33
34       --export-all
35           Don´t check for gitcvs.enabled in config. You also have to specify
36           a list of allowed directories (see below) if you want to use this
37           option.
38
39       --version, -V
40           Print version information and exit
41
42       --help, -h, -H
43           Print usage information and exit
44
45       <directory>
46           You can specify a list of allowed directories. If no directories
47           are given, all are allowed. This is an additional restriction,
48           gitcvs access still needs to be enabled by the gitcvs.enabled
49           config option unless --export-all was given, too.
50

DESCRIPTION

52       This application is a CVS emulation layer for git.
53
54       It is highly functional. However, not all methods are implemented, and
55       for those methods that are implemented, not all switches are
56       implemented.
57
58       Testing has been done using both the CLI CVS client, and the Eclipse
59       CVS plugin. Most functionality works fine with both of these clients.
60

LIMITATIONS

62       Currently cvsserver works over SSH connections for read/write clients,
63       and over pserver for anonymous CVS access.
64
65       CVS clients cannot tag, branch or perform GIT merges.
66
67       git-cvsserver maps GIT branches to CVS modules. This is very different
68       from what most CVS users would expect since in CVS modules usually
69       represent one or more directories.
70

INSTALLATION

72        1.  If you are going to offer anonymous CVS access via pserver, add a
73           line in /etc/inetd.conf like
74
75
76
77                  cvspserver stream tcp nowait nobody git-cvsserver pserver
78
79
80           Note: Some inetd servers let you specify the name of the executable
81           independently of the value of argv[0] (i.e. the name the program
82           assumes it was executed with). In this case the correct line in
83           /etc/inetd.conf looks like
84
85
86
87                  cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver
88
89
90           No special setup is needed for SSH access, other than having GIT
91           tools in the PATH. If you have clients that do not accept the
92           CVS_SERVER environment variable, you can rename git-cvsserver to
93           cvs.
94
95           Note: Newer CVS versions (>= 1.12.11) also support specifying
96           CVS_SERVER directly in CVSROOT like
97
98
99
100               cvs -d ":ext;CVS_SERVER=git-cvsserver:user@server/path/repo.git" co <HEAD_name>
101
102           This has the advantage that it will be saved in your CVS/Root files
103           and you don´t need to worry about always setting the correct
104           environment variable.
105
106        2.  For each repo that you want accessible from CVS you need to edit
107           config in the repo and add the following section.
108
109
110
111                  [gitcvs]
112                       enabled=1
113                       # optional for debugging
114                       logfile=/path/to/logfile
115
116
117           Note: you need to ensure each user that is going to invoke
118           git-cvsserver has write access to the log file and to the database
119           (see Database Backend. If you want to offer write access over SSH,
120           the users of course also need write access to the git repository
121           itself.
122
123           All configuration variables can also be overridden for a specific
124           method of access. Valid method names are "ext" (for SSH access) and
125           "pserver". The following example configuration would disable
126           pserver access while still allowing access over SSH.
127
128
129
130                  [gitcvs]
131                       enabled=0
132
133                  [gitcvs "ext"]
134                       enabled=1
135
136
137        3.  On the client machine you need to set the following variables.
138           CVSROOT should be set as per normal, but the directory should point
139           at the appropriate git repo. For example:
140
141           For SSH access, CVS_SERVER should be set to git-cvsserver
142
143           Example:
144
145
146
147                    export CVSROOT=:ext:user@server:/var/git/project.git
148                    export CVS_SERVER=git-cvsserver
149
150
151        4.  For SSH clients that will make commits, make sure their .bashrc
152           file sets the GIT_AUTHOR and GIT_COMMITTER variables.
153
154        5.  Clients should now be able to check out the project. Use the CVS
155           module name to indicate what GIT head you want to check out.
156           Example:
157
158
159
160                    cvs co -d project-master master
161
162

DATABASE BACKEND

164       git-cvsserver uses one database per git head (i.e. CVS module) to store
165       information about the repository for faster access. The database
166       doesn´t contain any persistent data and can be completely regenerated
167       from the git repository at any time. The database needs to be updated
168       (i.e. written to) after every commit.
169
170       If the commit is done directly by using git (as opposed to using
171       git-cvsserver) the update will need to happen on the next repository
172       access by git-cvsserver, independent of access method and requested
173       operation.
174
175       That means that even if you offer only read access (e.g. by using the
176       pserver method), git-cvsserver should have write access to the database
177       to work reliably (otherwise you need to make sure that the database if
178       up-to-date all the time git-cvsserver is run).
179
180       By default it uses SQLite databases in the git directory, named
181       gitcvs.<module_name>.sqlite. Note that the SQLite backend creates
182       temporary files in the same directory as the database file on write so
183       it might not be enough to grant the users using git-cvsserver write
184       access to the database file without granting them write access to the
185       directory, too.
186
187       You can configure the database backend with the following configuration
188       variables:
189
190   Configuring database backend
191       git-cvsserver uses the Perl DBI module. Please also read its
192       documentation if changing these variables, especially about
193       DBI->connect().
194
195       gitcvs.dbname
196           Database name. The exact meaning depends on the used database
197           driver, for SQLite this is a filename. Supports variable
198           substitution (see below). May not contain semicolons (;). Default:
199           %Ggitcvs.%m.sqlite
200
201       gitcvs.dbdriver
202           Used DBI driver. You can specify any available driver for this
203           here, but it might not work. cvsserver is tested with DBD::SQLite,
204           reported to work with DBD::Pg, and reported not to work with
205           DBD::mysql. Please regard this as an experimental feature. May not
206           contain double colons (:). Default: SQLite
207
208       gitcvs.dbuser
209           Database user. Only useful if setting dbdriver, since SQLite has no
210           concept of database users. Supports variable substitution (see
211           below).
212
213       gitcvs.dbpass
214           Database password. Only useful if setting dbdriver, since SQLite
215           has no concept of database passwords.
216       All variables can also be set per access method, see above.
217
218       Variable substitution
219              In dbdriver and dbuser you can use the following variables:
220
221              %G
222                  git directory name
223
224              %g
225                  git directory name, where all characters except for
226                  alpha-numeric ones, ., and - are replaced with _ (this
227                  should make it easier to use the directory name in a
228                  filename if wanted)
229
230              %m
231                  CVS module/git head name
232
233              %a
234                  access method (one of "ext" or "pserver")
235
236              %u
237                  Name of the user running git-cvsserver. If no name can be
238                  determined, the numeric uid is used.
239

ECLIPSE CVS CLIENT NOTES

241       To get a checkout with the Eclipse CVS client:
242
243
244        1.  Select "Create a new project -> From CVS checkout"
245
246        2.  Create a new location. See the notes below for details on how to
247           choose the right protocol.
248
249        3.  Browse the modules available. It will give you a list of the heads
250           in the repository. You will not be able to browse the tree from
251           there. Only the heads.
252
253        4.  Pick HEAD when it asks what branch/tag to check out. Untick the
254           "launch commit wizard" to avoid committing the .project file.
255       Protocol notes: If you are using anonymous access via pserver, just
256       select that. Those using SSH access should choose the ext protocol, and
257       configure ext access on the Preferences->Team->CVS->ExtConnection pane.
258       Set CVS_SERVER to git-cvsserver. Note that password support is not good
259       when using ext, you will definitely want to have SSH keys setup.
260
261       Alternatively, you can just use the non-standard extssh protocol that
262       Eclipse offer. In that case CVS_SERVER is ignored, and you will have to
263       replace the cvs utility on the server with git-cvsserver or manipulate
264       your .bashrc so that calling cvs effectively calls git-cvsserver.
265

CLIENTS KNOWN TO WORK

267       ·   CVS 1.12.9 on Debian
268
269       ·   CVS 1.11.17 on MacOSX (from Fink package)
270
271       ·   Eclipse 3.0, 3.1.2 on MacOSX (see Eclipse CVS Client Notes)
272
273       ·   TortoiseCVS
274

OPERATIONS SUPPORTED

276       All the operations required for normal use are supported, including
277       checkout, diff, status, update, log, add, remove, commit. Legacy
278       monitoring operations are not supported (edit, watch and related).
279       Exports and tagging (tags and branches) are not supported at this
280       stage.
281
282       The server should set the -k mode to binary when relevant, however,
283       this is not really implemented yet. For now, you can force the server
284       to set -kb for all files by setting the gitcvs.allbinary config
285       variable. In proper GIT tradition, the contents of the files are always
286       respected. No keyword expansion or newline munging is supported.
287

DEPENDENCIES

289       git-cvsserver depends on DBD::SQLite.
290
292       This program is copyright The Open University UK - 2006.
293
294       Authors:
295
296
297       ·   Martyn Smith <martyn@catalyst.net.nz>
298
299       ·   Martin Langhoff <martin@catalyst.net.nz>
300       with ideas and patches from participants of the git-list
301       <git@vger.kernel.org>.
302

DOCUMENTATION

304       Documentation by Martyn Smith <martyn@catalyst.net.nz>, Martin Langhoff
305       <martin@catalyst.net.nz>, and Matthias Urlichs <smurf@smurf.noris.de>.
306

GIT

308       Part of the git(7) suite
309
310
311
312
313Git 1.5.3.3                       10/09/2007                  GIT-CVSSERVER(1)
Impressum