git.postgresql.org

Introduction

The git.postgresql.org service is a code hosting service for PostgreSQL code repositories. The only thing hosted are code repositories using the git SCM.

If you are looking for a fully featured developlent platform with other advanced features beyond just a repository, we strongly advise you to look at github or gitlab. They provide full project hosting on git, including webpages, wikis and issue trackers. They provide a much more refined hosting product than we do, is free for open source projects.

If you want to work on code on one of the main PostgreSQL projects (including the backend and pgAdmin for example), there are mirrors of these projects available under the postgres organization on github. Forking from there will give you access to many useful github tools for tracking your work.

Obviously, if your project is not PostgreSQL related, this is not the place to go looking.

Features

For anonymous read access to all repositories, both git and http access is provided. There is also a gitweb browser available. These features can be selectively enabled or disabled on a per-repository basis.

Each repository also has ssh access. As a repository owner, you can also grant other people permissions so that they can also push changes to the repository. Note that ssh can only be used by those that have been granted explicit permissions, read or write. It cannot be used for anonymous access.

Instructions

Note that all changes made through the web interface are asynchronous. This means that it may take up to 15 minutes after you make a modification before it appears in the system.

Community account

The first step to access the service is to make sure you have a postgresql.org community account.

Since all access to the git repositories other than anonymous cloning is done over the SSH protocol, you need to upload your SSH key to your community account at the link above. Note that it can take up to 15 minutes for this key to propagate to the git system.

Getting access to an existing repository

To get access to an existing repository, contact the owner of the repository, and he/she can grant you permissions.

Requesting a new repository

To request a new repository, log in to the admin interface. Input the name of your requested repository, and click the Request new repository button. Note that the repository name should be a short and simple name for your repository using letters, numbers, dash and underscore only.

If your repository is the main repository for a project, it should live in the root namespace. If it's a personal development repository, for example a place to push your patches to the main PostgreSQL project, it should live under the users namespace, using the pattern users/<userid>/<repository>. Note that in most cases, using github and forking the PostgreSQL mirror is a better way to work with your development branches.

Once you have clicked this button you will reach the page to configure the repository. Fill in the description (mandatory) and any other fields you want. Note that the description is what will be used as the project description on the web - it is not a field for telling the administrators why you want the repository.

If you enter the URL of another git repository in the field for initial clone, this repository will be cloned into the new repository. You can also enter the name (not URL) of a local git repository for this. For example, enter postgresql to get a clone of the latest available version of the core PostgreSQL repository. Note that this will only create an initial clone - you will need to manually merge and push any updates after the initial clone.

Once your repository has been requested, it needs to be approved by one of the administrators before you will be able to use it. You can see the status of your repository from the main administration page.

Granting permissions

You can grant permissions to other users on your repository. Input the user id of the user in the empty field for users, select the desired permissions and click save. The userid is the community login name of the user.

To change the permissions of a user, just change the permissions value in the dropdown and click Save.

Finally, to remove the permissions for a user, mark the checkbox under Delete and click Save.

If anonymous and/or web access is provided, there is no point in granting read permissions, since anybody who wants can clone the repository from the anonymous URL instead.

Working with the repository

To pull and push with authenticated access, you must always use the ssh protocol. SSH access is always done using the git user - the full URL for the repository is
ssh://git@git.postgresql.org/repositoryname.git.