Getting access

Check the list of accounts on this server to
find out if there is one for your part of the University and who
manages the account. Each account is shared by all the members of
the group that it belongs to - there are no per-user logins.

To get access to the account, send the following to an account admin:

Your user name (CRSID).

Your ssh public key.

Support

If you have questions about using git or the git service, please
contact your account admins in the first instance.

Repository locations

The account admins determine who has access to which repositories
in their account. They can also allow unauthenticated public access
to some repositories. Repositories can be viewed in a web browser
using gitweb, as well as cloned using git itself.

The following subsections describe which URLs provide which kind
of access. In the URLs, acct is a place-holder for
the account name and repo is a place-holder for the
repository name.

Authenticated users

Read/write access using git and ssh:

git clone ssh://acct@git.uis.cam.ac.uk/repo

git clone acct@git.uis.cam.ac.uk:repo

List repos accessible this way:
ssh acct@git.uis.cam.ac.uk info

View in browser with Raven authentication:

https://git.uis.cam.ac.uk/i/acct/repo

List repos accessible this way:
https://git.uis.cam.ac.uk/i/acct/

You can switch to the external view by clicking the i
in the breadcrumbs.

Anonymous users

Read-only access to public repositories using git:

git clone git://git.uis.cam.ac.uk/acct/repo

View public repositories in browser:

https://git.uis.cam.ac.uk/x/acct/repo

List repos accessible this way:
https://git.uis.cam.ac.uk/x/acct/

You can switch to the internal view by clicking the x
in the breadcrumbs.

Server commands

There are a number of commands you can run on the server. You can
run a command without parameters to get help on how to use it. In
the following replace acct with your account name.

ssh acct@git.uis.cam.ac.uk help

Produces a list of commands that you can run.

ssh acct@git.uis.cam.ac.uk info

Produces a list of repositories that you have access to, and
what kinds of access you are permitted. Use the -lc
option to list repo creators and/or the -ld option to
list repo descriptions.

ssh acct@git.uis.cam.ac.uk sskm

Self-service key management. This allows you to update
the ssh keys you use to log in to the account without
bothering an account admin.
See the sskm
command documentation for details.

ssh acct@git.uis.cam.ac.uk list-dangling-repos

To help admins keep their accounts tidy.

Wild repos

The other commands are for manipulating user-managed "wild"
repositories. In the output of the info command you will
usually see a line like this:

C u/CREATOR/..*

This means you have permission to create repositories without
bothering the account admins, provided they have names of the
form u/spqr2/wombat where spqr2 is your user name
and wombat is the repository name. You can run these
commands without parameters to get more detailed help.

The admin documentation on
groups explains the asymmetry in controlling anonymous access,
where you grant access to the @all group but deny access
to the @public group. It also has more information about
the special groups listed above. However, the @lookup_
pseudo-groups do not work with the perms command.

Access control for groups

When your account admin has made a
wild repository area for your group, there's a basic recipe you
can follow to set up the permissions after you create a repository.
Say your group is called "wombles":

Create a repo:

ssh acct@git.uis.cam.ac.uk create wombles/orinoco

Make your fellow wombles OWNERS of the repo, so they
have read/write access and can adjust its perms:

ssh acct@git.uis.cam.ac.uk perms wombles/orinoco + OWNERS @wombles

Give read access to your other colleagues:

ssh acct@git.uis.cam.ac.uk perms wombles/orinoco + R @ssh

gitconfig variables

You can set the following gitconfig variables
using the config command, to adjust gitweb or to set
up gitpush hooks.

To configure gitweb repository listings and summaries
(see the gitweb
manual for details):

README files for gitweb

There are two ways to make gitweb display a README.html
file on a repository's summary page: by setting some
gitconfig hook variables on the server, or by
running the readme command.

The readme hook

If you would like gitweb to display a README file which you have
committed to your repository, set the confighooks.readme-file variable to the filename. If the
filename does not have a .txt, .html,
or .md extension, set the confighooks.readme-type variable to "text", "html", or
"markdown". For example,

ssh acct@git.uis.cam.ac.uk configrepo hooks.readme-file README.md

When you push a change to the repository, its README is
automatically updated. If hooks.readme-file is "-" then it
will be deleted on the next push.

The readme command

The readme command allows you to put an HTML fragment on
the server which does not need to be committed to the repository.
It can be a bit quicker than the hook, but it only works for wild
repositories and it does not update the README automatically. As
with other server commands you can get usage instructions by
running it without arguments. For example,

markdown README.md | ssh acct@git.uis.cam.ac.uk readmerepo set

Push notification email with multimail

It is often helpful to get automated email notification of
changes to a shared repository. You can configure
the multimail hook to do this. It has many settings which
are described in
the multimail README.

To use multimail you must set the
git configmultimailhook.mailinglist variable.
If you only set this variable, each push will generate a summary
message describing each changed branch or tag, plus a message
describing each new commit.

You can turn off the per-commit messages, and include a log of
the patches in the summary messages instead, with the following
settings: