Development/gerrit/setup/ja

From The Document Foundation Wiki
Jump to: navigation, search
This page is a translated version of the page Development/gerrit/setup and the translation is 0% complete.

Other languages:
English • ‎italiano • ‎日本語 • ‎한국어 • ‎português do Brasil

Setting yourself up for gerrit

Before you start: Troubleshooting help

The instructions below should be easy and quick to follow. However, if you get stuck somewhere, here is how you get help:

Register in Gerrit for first time

Gerrit uses The Document Foundation's Single-On service for authentication. Create an account there if you don't have one already (several other sites, such as this wiki, use it too). Then simply launch gerrit and click on the “Sign in” link at the top right of the page. You'll be redirected to our central authentication portal, and then back to Gerrit once authenticated.

Setting yourself up for gerrit - the easy way

If you have a checkout of libreoffice/core already, you can just run ./logerrit setup, which will try to automatically setup keys and configure ssh for you, and if it can't it will guide you through these steps: if necessary, just follow the steps.

The program will tell you to go to https://gerrit.libreoffice.org, click Register and remember your username. The program will also generate a public SSH key, print it and save it to /home/[username]/.ssh/id_rsa.pub. This key will begin with 'ssh-rsa'. You must enter this key during the registration process on the website (or add it later in SSH Public Keys under Settings in order for gerrit to work.

If ./logerrit test fails and ssh -vvv logerrit informs you about ~/.ssh/config having bad permissions, run chmod 600 config in ~/.ssh.

Detailed and nitty-gritty setup topics

Setting yourself up for gerrit - the manual way

  1. Create an account at https://gerrit.libreoffice.org
  2. You must set your username in your gerrit account settings). Users are associated by username and SSH key. This username is referred to as YOUR_USERNAME_HERE below.
  3. Generate an SSH keypair for gerrit and upload the public key in the preferences (of course you can also reuse an existing key)
  4. Add the following to your ${HOME}/.ssh/config (both sections are identical except for the "Host" line):
     Host logerrit gerrit.libreoffice.org
           IdentityFile /path/to/your/private-key
           User YOUR_USERNAME_HERE
           Port 29418
           HostName gerrit.libreoffice.org
    

    Note that /path/to/your/private-key must include the file name as well. For example: ~/.ssh/id_rsa

  5. Setup your git repo so that it pushes to gerrit using the SSH key:
    git config remote.origin.pushurl ssh://logerrit/core
    
  6. Install the hooks:
    cd .git/hooks && ln -s ../../.git-hooks/* ./
    
  7. and you are ready to go!

Now push !

See: How to submit patches