Git Hosting: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
We have a [https://git.csclub.uwaterloo.ca gitea] instance running off of <nowiki>caffeine</nowiki>. You can sign in via LDAP to the web interface. Projects used by CSC as a whole are owned by the [https://git.csclub.uwaterloo.ca/public public] organization.
We have a [https://git.csclub.uwaterloo.ca gitea] instance running off of <nowiki>caffeine</nowiki>. You can sign in via LDAP to the web interface. Projects used by CSC as a whole are owned by the [https://git.csclub.uwaterloo.ca/public public] organization.

== Creating a public project ==
<ol>
<li>
Make sure you part of the <code>git</code> 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 <code>groups</code> command to check if you part of the <code>git</code> group yet.
</li>
<li>
Login to caffeine and run the following:
<pre>
become_club git
cd /srv/git/public
git init --bare projectname.git
chmod -R g+x projectname.git
</pre>
</li>
<li>
On any other CSC machine, you can clone the repo by running the following:
<pre>
git clone /srv/git/public/projectname.git
</pre>
</li>
<li>
On a non-CSC machine, you can clone the repo by running the following:
<pre>
git clone username@caffeine.csclub.uwaterloo.ca:/srv/git/public/projectname.git
</pre>
If you wish to push an existing repo to an empty repo on the server, run the following:
<pre>
git remote add csc username@caffeine.csclub.uwaterloo.ca:/srv/git/public/projectname.git
git push csc branchname
</pre>
</li>
</ol>


== Creating a personal project ==
== Creating a personal project ==

Revision as of 17:35, 19 June 2021

We have a gitea instance running off of caffeine. You can sign in via LDAP to the web interface. Projects used by CSC as a whole are owned by the public organization.

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.