Git at Apache

Please contact the mailing list if you have comments or suggestions regarding this service.

Repository Checkout

For now the repository URLs are all of the form:

To clone a repository:

# Non Committers
$ git clone

# Committers
$ git clone

Committers: Getting Started

First things first, you'll want to set up your name and email that will be used by git when you make commits:

$ git config --global "My Name Here"
$ git config --global

If you're a long time GitHub user you can instead set these configuration variables on a per repository basis like such:

$ git config "My Name Here"
$ git config

You can also add your email address to your GitHub account so that your Gravatar and user account are linked to from the Apache mirrors on GitHub.

To push to a repository you need to authenticate. More recent versions of Git will prompt for a username and password, and in some cases will cache the credentials in your operating system's default credential store.

On Mac OS X, you need to have installed git-credential-osxkeychain and set the following configuration:

$ git config --global credential.helper osxkeychain

If you are not prompted, then you will need to setup a ~/.netrc file that contains your user credentials:

$ (umask 0277; cat >> ~/.netrc <<EOF)
login username
password mypassword
chmod 0600 ~/.netrc

Alternatively you can list your username in the Git repository URL but this will require that you type your password for every fetch and push. You can do this by cloning a URL like:

$ git clone

While its possible to list your password in the URL this is highly discouraged as it obviously leaves your password in plain text in the shell history.

Windows Users

You can use git-gui as part of the msysgit package.

Instead of setting up a ~/.netrc file you need to:

  1. Set up a %HOME% environment pointing to C:\Users\yourloginname\
  2. Create a _netrc file in %HOME%\_netrc with this text all on one line: machine login username password mypassword

Line Endings

In general, you will want line endings to be normalized in the Git repository and set to be platform specific on checkout.

The msysgit installer on Windows will prompt to set the core.autocrlf setting to true by default. On Mac OS X or Linux, the following setting should be used:

$ git config --global core.autocrlf input

Further details and attributes for handling them differently per file type can be found in the GitHub article Dealing with line endings.

Submitting Repository Requests

With the continued growth of git usage, a service was created to support creating new repositories for PMCs. It is a fully automated tool, eliminating any additional tickets. The tool can be found at

Ongoing improvements

Improvements to Git support at Apache are being discussed on the infrastructure dev list. This list is open to everyone and is publicly archived. You can subscribe to this mailing list by sending a message to