Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Icon

The Asterisk project is currently undergoing a migration from Subversion to Git. As a result, this page is still a work in progress.

Overview

The Asterisk project uses Gerrit for code reviews, continuous integration validation, and git management. When creating a patch to Asterisk or its various related projects, all patches should be pushed to Gerrit for review.

Use of Gerrit is beyond the scope of this wiki page - for in depth information, see the Gerrit documentation.

Creating an Account

Gerrit uses OpenID in conjunction with the Asterisk project's Atlassian infrastructure to provide single sign-on. If you already have an account in the Asterisk project infrastructure (such as JIRA) and have signed a Contributor License Agreement, you should be able to sign in to Gerrit automatically.

  1. Create an account at signup.asterisk.org.

  2. Sign a Contributor License Agreement.

    Icon

    Until your Contributor License Agreement is approved, you will not be able to sign into the project OpenID provider or Gerrit.

  3. Browse to Gerrit, and click Sign In.

  4. This will redirect to openid.asterisk.org. Sign in with your Atlassian username/password.

  5. Upon signing in successfully, you will need to authorize Gerrit to access your OpenID. When you have done so, you should be redirected back to Gerrit, and will be signed in.

On this Page

Setting up your Gerrit Account

  1. Add an SSH key
  2. Set your username

Cloning from Gerrit

  • SSH:

    git clone ssh://{user}@{server}:29418/{repo}
  • HTTP:

    git clone http://{user}@{server}/{repo}
  • Anonymous HTTP:

    git clone http://{server}/{repo}

Pushing to Gerrit

  1. How to push:

    $ git push ssh://{username}@{server}:29418/{repo} HEAD:/refs/for/master
  2. Change-ID: Make sure you install the hook, if it isn't already there!
    1. Installing it:

      scp -p -P 29418 {username}@{server}:hooks/commit-msg {local-repo}/.git/hooks/
    2. Fixing it if you forgot:

      git commit -amend

Updating a Review

  1. Make sure any new commits use the same Change ID
  2. Squash your commits back down into one (preferably)

    git rebase -i HEAD~{num}
  3. Re-push

 

  • No labels