mantisbt:gitosis_management
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mantisbt:gitosis_management [2008/11/05 15:00] – Adding a new repo. jreese | mantisbt:gitosis_management [2008/11/07 02:16] (current) – Added steps to mitigate errors I got + renamed to myplugin. vboctor | ||
---|---|---|---|
Line 8: | Line 8: | ||
Gitosis does its magic via the '' | Gitosis does its magic via the '' | ||
+ | |||
+ | ==== Clone and Push URL's ==== | ||
+ | |||
+ | All repositories hosted by Gitosis have a " | ||
+ | |||
+ | < | ||
+ | |||
+ | Public repositories have a separate clone URL that uses an unauthenticated connection to allow cloning the repository without any permissions check: | ||
+ | |||
+ | < | ||
==== Repository Layout ==== | ==== Repository Layout ==== | ||
Line 46: | Line 56: | ||
==== Adding a New Repository ==== | ==== Adding a New Repository ==== | ||
- | For this section, we'll assume you want to create a new repository named '' | + | For this section, we'll assume you want to create a new repository named '' |
By default, all new repositories remain private, meaning that only the users you grant explicit read/write access through Gitosis will be able to interact with it. We'll cover how to make a private repository public later. | By default, all new repositories remain private, meaning that only the users you grant explicit read/write access through Gitosis will be able to interact with it. We'll cover how to make a private repository public later. | ||
Line 56: | Line 66: | ||
Edit '' | Edit '' | ||
< | < | ||
- | [repo mantis-plugin] | + | [repo myplugin] |
description = A plugin for the Mantis Bug Tracker. | description = A plugin for the Mantis Bug Tracker. | ||
owner = John Smith | owner = John Smith | ||
- | [group | + | [group |
- | writable = mantis-plugin | + | writable = myplugin |
members = jsmith @core | members = jsmith @core | ||
</ | </ | ||
Line 78: | Line 88: | ||
< | < | ||
$ git add gitosis.conf keydir/ | $ git add gitosis.conf keydir/ | ||
- | $ git commit -m "Added 'mantis-plugin' repository and ' | + | $ git commit -m "Added 'myplugin' repository and ' |
$ git pull --rebase | $ git pull --rebase | ||
Line 84: | Line 94: | ||
</ | </ | ||
- | Congratulations! | + | Congratulations! |
< | < | ||
- | $ cd /path/to/mantis-plugin | + | $ cd /path/to/myplugin |
- | $ git remote add origin git@mantisbt.org: | + | $ git remote rm origin |
+ | $ git remote add origin git@mantisbt.org: | ||
$ git push origin master | $ git push origin master | ||
</ | </ | ||
You're done! | You're done! | ||
+ | |||
+ | ==== Making a Repository Public ==== | ||
+ | |||
+ | We'll assume the same repository name of '' | ||
+ | |||
+ | First, we need to open up permissions on the repository directory so that all users have read and execute permissions: | ||
+ | |||
+ | < | ||
+ | # sudo chmod 755 ~git/ | ||
+ | </ | ||
+ | |||
+ | Next we need to symlink to the repository from a location where git-daemon and gitweb are both looking for shared repos: | ||
+ | |||
+ | < | ||
+ | # sudo ln -s ~git/ | ||
+ | </ | ||
+ | |||
+ | Congratulations! | ||
+ | |||
+ | Remember: git:// only provides read access to the repository. | ||
===== References ===== | ===== References ===== |
mantisbt/gitosis_management.1225915211.txt.gz · Last modified: 2008/11/05 15:19 (external edit)