Creating Your Project Page

In the discussion that follows, assume your username is "myuser", and your project name is "myproject". Assume that you are logged into a Linux Lab box, either locally or through SSH to linuxlab.cs.pdx.edu.

First, let's get the Trac instance up and running. As reported earlier, start by hitting

  https://projects.cecs.pdx.edu/~myuser/myproject

(Note the crucial "s" in in "https".) You should see an empty wiki. To create content on this wiki, you'll have to give yourself an authenticator so that you can log into it. Change directory to

  /www/trac/myproject

and say

htpasswd htpasswd myuser

(Yes, the repetition is intentional.) You will be prompted for a password, which you will enter. Then log into the Trac instance through your web browser in the obvious way. You should now be able to edit content on your wiki.

Note that you can change various Trac settings by running

  trac-admin /www/trac/myproject

This is a horrible little tool, but it will mostly get the job done.

Now let's get your Git repo up and running. The trick here is that the repo you were provided with is initially empty, and Git, especially older versions, doesn't deal well with empty repos. (Technically speaking, there's no default "master" branch in the repo, so Git gets confused.) So you'll need to generate an initial checkin and push it into your repository before it will be useful.

Your eventual Git "master" repository lives at

  /www/svn/myproject.git

For starters, let's make sure you have a repository to push from.

If you do not already have a git repository you are working out of, make a directory somewhere in your space called myproject, put at least one file in it, and get Git initialized in it.

  cd
  mkdir myproject
  cd myproject
  touch README
  git-init
  git-add README
  git-commit -a -m 'put a description of myproject here'

If you already are working from a Git repo, go to that repo. If the repo is a clone of some remote "master" repo, you need to remove its clone nature, which you do by first making sure it's up to date:

  git-pull

and then hand-removing the section in .git/config labeled [remotes] using a text editor. (Newer versions of Git than the one in the Linux lab have a less gross way of doing this, using "git-remote rm".)

Now you are ready to add the new "master" remote and push your repository up to it.

  git-remote add -t master -m master origin /www/svn/myproject.git
  git-push -f --all --tags

Check that you are up to date.

  git-pull

You will be.

Finally, check that your Trac instance sees your new repository by clicking on the "source" tab in your Trac.

You should now be able to clone your new Git "master" remotely by using

  git-clone ssh://linuxlab.cs.pdx.edu/www/svn/myproject.git

Have fun, and let me know if you have any questions!