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 14:43] – 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 43: | Line 53: | ||
Gitosis will then handle updating all the repositories appropriately. | Gitosis will then handle updating all the repositories appropriately. | ||
+ | |||
+ | ==== Adding a New Repository ==== | ||
+ | |||
+ | 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. | ||
+ | |||
+ | < | ||
+ | $ cd gitosis-admin | ||
+ | </ | ||
+ | |||
+ | Edit '' | ||
+ | < | ||
+ | [repo myplugin] | ||
+ | description = A plugin for the Mantis Bug Tracker. | ||
+ | owner = John Smith | ||
+ | |||
+ | [group myplugin] | ||
+ | writable = myplugin | ||
+ | members = jsmith @core | ||
+ | </ | ||
+ | |||
+ | Notice that both the repo and the new group share the same name so that their relation is obvious when looking at the file. Also of note is that the '' | ||
+ | |||
+ | If the user '' | ||
+ | < | ||
+ | $ cat > keydir/ | ||
+ | ... | ||
+ | ^D | ||
+ | </ | ||
+ | |||
+ | Now you need to add and commit your changes to the repository, and then push your commit back to the server: | ||
+ | |||
+ | < | ||
+ | $ git add gitosis.conf keydir/ | ||
+ | $ git commit -m "Added ' | ||
+ | |||
+ | $ git pull --rebase | ||
+ | $ git push | ||
+ | </ | ||
+ | |||
+ | Congratulations! | ||
+ | |||
+ | < | ||
+ | $ cd / | ||
+ | $ git remote rm origin | ||
+ | $ git remote add origin git@mantisbt.org: | ||
+ | $ git push origin master | ||
+ | </ | ||
+ | |||
+ | 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 ===== | ||
Line 55: | Line 136: | ||
[gitosis] | [gitosis] | ||
- | |||
[group quux] | [group quux] |
mantisbt/gitosis_management.1225914203.txt.gz · Last modified: 2008/11/05 15:00 (external edit)