man cg-admin-setuprepo (Commandes) - setup a public git repository

NAME

cg-admin-setuprepo - setup a public git repository

SYNOPSIS

cg-admin-setuprepo [-g GROUP] DIRECTORY

DESCRIPTION

Setup a public GIT repository, that is, one that has no attached working copy and you typically only push into it and pull from it. You need to run this command before you will be able to push into the repository for the first time, but you will be also unable to pull from the repository until you push into it at first.

Therefore the workflow is to first init a regular private repository, then use this command to create the public one, then add the appropriate remote branch (cg-branch-add origin ...) in your private repository and then push to the public repository.

Use cg-init(1) if you want to instead create a new GIT project.

The command will create the repository to reside in DIRECTORY (the directory must not exist before calling this command). By default, it will be world-readable, but writable only by you. If you want to make it possible for multiple users to push, create a group for them and use the -g parameter, which will make cg-admin-setuprepo(1) set up the permissions properly.

The repository will also be set up so that git-update-server-info will be automagically re-ran after each push, in short making it suitable for HTTP access.

Note that you might need to do other additional steps, like touching the git-daemon-export-ok file if you want to make the repository accessible by the git daemon (serving the git://... URIs).

OPTIONS

-g GROUP
Name of the UNIX group covering the users authorized to push into the repository. If unspecified, only you (who ran this command) will have write (push) access.
-h, --help
Print usage help.

NOTES

It may happen that you are using version of GIT missing the default post-update hook, or that the relevant template hooks are not available on your system or with your GIT installation. In that case, in order to have your repository properly accessible with HTTP, you need to add this to .git/hooks/post-update (and then make it eXecutable):

#!/bin/sh
exec git-update-server-info

COPYRIGHT

Copyright © Petr Baudis, 2005

SEE ALSO

cg-admin-setuprepo command is part of cogito(7), a toolkit for managing git(7) trees.