User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:gitosis_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mantisbt:gitosis_management [2008/11/05 15:39] – URL's jreesemantisbt:gitosis_management [2008/11/07 02:16] (current) – Added steps to mitigate errors I got + renamed to myplugin. vboctor
Line 56: Line 56:
 ==== Adding a New Repository ==== ==== Adding a New Repository ====
  
-For this section, we'll assume you want to create a new repository named ''mantis-plugin'', and give write access to the repository owner ''jsmith'' and the core developer group ''core'' You will want to replace the repository, user, or group names as appropriate.+For this section, we'll assume you want to create a new repository named ''myplugin'', and give write access to the repository owner ''jsmith'' and the core developer group ''core'' You will want to replace the repository, user, or group names as appropriate.
  
 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 66: Line 66:
 Edit ''gitosis.conf'' and add a section to the end of the file with the following contents: Edit ''gitosis.conf'' and add a section to the end of the file with the following contents:
 <code> <code>
-[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 mantis-plugin+[group myplugin
-writable = mantis-plugin+writable = myplugin
 members = jsmith @core members = jsmith @core
 </code> </code>
Line 88: Line 88:
 <code> <code>
 $ git add gitosis.conf keydir/jsmith.pub $ git add gitosis.conf keydir/jsmith.pub
-$ git commit -m "Added 'mantis-plugin' repository and 'jsmith' user."+$ git commit -m "Added 'myplugin' repository and 'jsmith' user."
  
 $ git pull --rebase    # make sure we have the latest updates from the server $ git pull --rebase    # make sure we have the latest updates from the server
Line 94: Line 94:
 </code> </code>
  
-Congratulations!  Your new repository is now configured through Gitosis.  Your next step is to push an existing Git checkout/clone to the new repository URL:+Congratulations!  Your new repository is now configured through Gitosis.  Note that you will get an error that the repository doesn't exist.  Your next step is to push an existing Git checkout/clone to the new repository URL:
  
 <code> <code>
-$ cd /path/to/mantis-plugin +$ cd /path/to/myplugin 
-$ git remote add origin git@mantisbt.org:mantis-plugin.git+$ git remote rm origin 
 +$ git remote add origin git@mantisbt.org:myplugin.git
 $ git push origin master $ git push origin master
 </code> </code>
Line 106: Line 107:
 ==== Making a Repository Public ==== ==== Making a Repository Public ====
  
-We'll assume the same repository name of ''mantis-plugin'', and that we want the repository to be publicly available without authentication, and viewable on the web via gitweb.  You'll need to have root access on the server to perform these steps.+We'll assume the same repository name of ''myplugin'', and that we want the repository to be publicly available without authentication, and viewable on the web via gitweb.  You'll need to have root access on the server to perform these steps.
  
 First, we need to open up permissions on the repository directory so that all users have read and execute permissions: First, we need to open up permissions on the repository directory so that all users have read and execute permissions:
  
 <code> <code>
-# chmod 755 ~git/repositories/mantis-plugin.git+sudo chmod 755 ~git/repositories/myplugin.git
 </code> </code>
  
Line 117: Line 118:
  
 <code> <code>
-# ln -s ~git/repositories/mantis-plugin.git /var/cache/git/+sudo ln -s ~git/repositories/myplugin.git /var/cache/git/
 </code> </code>
  
-Congratulations!  You can view the repository with gitweb at a URL similar to http://git.mantisbt.org/?p=mantis-plugin.git, and users can clone the repository from the URL git://mantisbt.org/mantis-plugin.git+Congratulations!  You can view the repository with gitweb at a URL similar to http://git.mantisbt.org/?p=myplugin.git, and users can clone the repository from the URL git://mantisbt.org/myplugin.git
  
-Remember: git:// only provides read access to the repository.  Developers will still need to clone from ''git@mantisbt.org:mantis-plugin.git'' in order to be able to push changes back to the server.+Remember: git:// only provides read access to the repository.  Developers will still need to clone from ''git@mantisbt.org:myplugin.git'' in order to be able to push changes back to the server.
  
 ===== References ===== ===== References =====
mantisbt/gitosis_management.1225917586.txt.gz · Last modified: 2008/11/07 02:16 (external edit)

Driven by DokuWiki