Skip to content
Snippets Groups Projects
Commit 33c5d911 authored by Iain R. Learmonth's avatar Iain R. Learmonth
Browse files

git-team docs

parent 2b85e7b4
No related branches found
No related tags found
No related merge requests found
git.mdwn 0 → 100644
# Infrastructure service git
Our git setup consists of three interdependent services:
* git-rw.torproject.org: ssh accessible and writeable git repositories
* git.torproject.org: https:// read-only anonymous access
* [https://gitweb.torproject.org/ gitweb.torproject.org]: web browsing repositories
# Regular repositories
## Creating a new repository
Creating a new top-level repository is not something that should be done often.
The top-level repositories are all shown on the gitweb, and we'd like to keep
the noise down. If you're not sure if you need a top-level repository then
perhaps request a user repository first, and use that until you know you need
a top-level repository.
Some projects, for example pluggable-transports, have a path hierachy for their
repositories. This should be encouraged to help keep this organised.
A request for a new top-level repository should include: the users that should
have access to it, the repository name (including any folder it should live in),
and a short description. If the users that should have access to this repository
should be kept in sync with some other repository, a group might be created or
re-used as part of the request.
For example:
```
Please create a new user repository metrics/awesome-pipeline.git.
This should be accessible by the same set of users that have access to the
metrics-cloud repository.
The description for the repository is: Tor Metrics awesome pipeline repository.
This message was signed for trac.torproject.org on 2018-10-16 at 19:00:00 UTC.
```
The git team may ask for additional information to clarify the request if
necessary, and may ask for replies to that information to be signed if they
would affect the access to the repository. In the case that replies are to be
signed, include the ticket number in the signed text to avoid replay attacks.
## Adding developers to a repository
If you want access to an existing repository please have somebody who already
has access to ask that you be added by filing a trac ticket. This should be GPG
signed as above.
[Request a user be added to an existing repository](https://trac.torproject.org/projects/tor/newticket?summary=Please%20add%20%3Cusername%3E%20to%20repository%20%3Crepository%3E.git&component=Internal%20Services/Service%20-%20git&type=task)
# User repositories
Developers who have a tpo LDAP account can request personal git repositories be
created on our git infrastructure. Please file a ticket in Trac using the link
below. User repositories have the path `user/<username>/<repository>.git`.
[Request a new user repository](https://trac.torproject.org/projects/tor/newticket?summary=Please%20create%20new%20repository%20user/%3Cusername%3E/%3Crepository%3E.git&component=Internal%20Services/Service%20-%20git&type=task)
This request should contain: username, repository name, and a short
description. Here is an example where irl is requesting a new example
repository:
```
Please create a new user repository user/irl/example.git.
The description for the repository is: Iain's example repository.
This message was signed for trac.torproject.org on 2018-10-16 at 19:00:00 UTC.
```
Please use GPG to clearsign this text, it will be checked against the GPG key
that you have linked to you in our LDAP. Additionally, ensure that it is
wrapped as a code block (within !{{{ }}}).
There have not yet been any cases where user repositories have allowed access
by other users than the owner. Let's keep it that way or this will get
complicated.
# Learning what git repos you can read/write
Once you have an LDAP account and have an ssh key set up for it, run:
{{{
ssh git@git-rw.torproject.org
}}}
and it will tell you what bits you have on which repos. The first column is who
can read (@ for everybody, R for you, blank for not you), and the second column
is who can write (@ for everybody, W for you, blank for not you).
# Commit hooks
There are a variety of commit hooks that are easy to add for your git repo,
ranging from irc notifications to email notifications to github auto-syncing.
Clone the gitolite-admin repo and look at the "config hooks" lines for
examples. You can request changes by filing a trac ticket as described above,
or just request the hooks when you first ask for your repo to be set up.
## Standard Commit Hooks for Canonical Repositories
Changes to most repositories are reported to:
* the #tor-bots IRC channel (or #tor-internal for private admin repositories)
## GitHub and GitLab Mirrors
Some repositories have a dedicated mailing list for commits at https://lists.torproject.org
Some repositories are mirrored to https://github.com/torproject
......@@ -35,7 +35,7 @@ We also keep our minutes here.
== other, non TSA stuff
* [[git repos and gitweb|https://trac.torproject.org/projects/tor/wiki/org/operations/Infrastructure/git.torproject.org]]
* [[git repos and gitweb|git]]
* [[even more infrastructure|https://trac.torproject.org/projects/tor/wiki/org/operations/Infrastructure]]
== old
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment