1CG-ADMIN-SETUPREPO(1) CG-ADMIN-SETUPREPO(1)
2
3
4
6 cg-admin-setuprepo - setup a public repository
7
9 cg-admin-setuprepo [-g GROUP] REPOSITORY
10
11
13 Setup a public GIT repository, that is, one that has no attached
14 working copy and you typically only push into it and pull from it. You
15 need to run this command before you will be able to push into the
16 repository for the first time, but you will be also unable to pull from
17 the repository until you push into it at first.
18
19 Therefore the workflow is to first init a regular private repository,
20 then use this command to create the public one, then add the
21 appropriate remote branch (cg-branch-add origin ...) in your private
22 repository and then push to the public repository.
23
24 Use cg-init(1) if you want to instead create a new GIT project.
25
26 The command will create the repository to reside in REPOSITORY (either
27 local path or git+ssh URL; the directory must not exist before calling
28 this command). By default, it will be world-readable, but writable only
29 by you. If you want to make it possible for multiple users to push,
30 create a group for them and use the -g parameter, which will make
31 cg-admin-setuprepo(1) set up the permissions properly.
32
33 Note that in case you are using cg-admin-setuprepo with SSH URL instead
34 of a local path, you need a full shell access at the remote machine,
35 the restricted git-shell access is not enough.
36
37 The repository will also be set up so that git-update-server-info will
38 be automagically re-ran after each push, in short making it suitable
39 for HTTP access.
40
41 Note that you might need to do other additional steps, like touching
42 the git-daemon-export-ok file if you want to make the repository
43 accessible by the git daemon (serving the git://... URIs).
44
45
47 -g GROUP
48 Name of the UNIX group covering the users authorized to push
49 into the repository. If unspecified, only you (who ran this
50 command) will have write (push) access.
51
52 -h, --help
53 Print usage summary.
54
55 --long-help
56 Print user manual. The same as found in cg-admin-setuprepo(1).
57
59 It may happen that you are using version of GIT missing the default
60 post-update hook, or that the relevant template hooks are not available
61 on your system or with your GIT installation. In that case, in order to
62 have your repository properly accessible with HTTP, you need to add
63 this to .git/hooks/post-update (and then make it eXecutable):
64
65
66 #!/bin/sh
67 exec git-update-server-info
68
70 Copyright © Petr Baudis, 2005
71
72
74 cg-admin-setuprepo is part of cogito(7), a toolkit for managing git(7)
75 trees.
76
77
78
79
80 12/11/2006 CG-ADMIN-SETUPREPO(1)