Git Hosting: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
m (Merenber moved page Git to Git Hosting)
m (we run gitweb; not cgit)
Line 1: Line 1:
We have a cgit[https://git.csclub.uwaterloo.ca] instance running off of <nowiki>caffeine</nowiki>. Each club member may have their own directory. Projects used by CSC as a whole are hosted in the <code>public</code> directory.
We have a gitweb[https://git.csclub.uwaterloo.ca] instance running off of <nowiki>caffeine</nowiki>. Each club member may have their own directory. Projects used by CSC as a whole are hosted in the <code>public</code> directory.


== Creating a public project ==
== Creating a public project ==

Revision as of 20:44, 21 February 2021

We have a gitweb[1] instance running off of caffeine. Each club member may have their own directory. Projects used by CSC as a whole are hosted in the public directory.

Creating a public project

  1. Make sure you part of the git group. If not, add yourself to the group via ceo. Note that it may take a while until the servers synchronize with LDAP. Use the groups command to check if you part of the git group yet.
  2. Login to caffeine and run the following:
    become_club git
    cd /srv/git/public
    git init --bare projectname.git
    chmod -R g+x projectname.git
    
  3. On any other CSC machine, you can clone the repo by running the following:
    git clone /srv/git/public/projectname.git
    
  4. On a non-CSC machine, you can clone the repo by running the following:
    git clone username@caffeine.csclub.uwaterloo.ca:/srv/git/public/projectname.git
    

    If you wish to push an existing repo to an empty repo on the server, run the following:

    git remote add csc username@caffeine.csclub.uwaterloo.ca:/srv/git/public/projectname.git
    git push csc branchname
    

Creating a personal project

On caffeine, run become_club git and create the directory /srv/git/username. Login to aspartame and run, as root, chown username /srv/git/username. As your regular user, you can now create subdirectories under /srv/git/username using git init --bare projectname.git.

See the previous section for instructions on how to clone/push to your repo.