Gitolite SSH Setup

Last modified by Greg Stinocher on 2013/04/25 13:53

Back to Support 

Gitolite SSH Setup

Create ssh key

  • To create a key-pair, run ssh-keygen with the -t option. The -t option specifies which crypto system you want the key to use. The valid options are "rsa", "dsa". In this example, we have elected to use RSA authentication:

              $ ssh-keygen -t rsa
              Generating public/private rsa key pair

  • Next you will be prompted for a passphrase, which is used to encrypt the private key. After you enter the passphrase you will be asked to verify it.

              Enter file in which to save the key (/home/sshuser/.ssh/id_rsa):
              Enter passphrase (empty for no passphrase): **********************
              Enter same passphrase again: **********************

  • If the two passphrases do not match, you will be given an error message and asked to enter the passphrases in again, as shown below.

              Passphrases do not match. Try again.
              Enter passphrase (empty for no passphrase): **********************
              Enter same passphrase again: **********************

  • Once the passphrases match, ssh-keygen will display a message indicated where the public and private keys will be saved.

              Your identification has been saved in /home/sshuser/.ssh/id_rsa.
              Your public key has been saved in /home/sshuser/.ssh/id_rsa.pub.
              The key fingerprint is:
              9a:7a:87:33:14:d2:12:72:7c:3f:ea:54:a4:2e:b6:ba sshuser@server.example.com

Configure ssh client settings

  • Edit your ssh client configuration, such that ssh requests to git.codeaurora.org are sent over port 9222. This is accomplished by creating or modifying /home/sshuser/.ssh/config with the following value.

              Host git.codeaurora.org
                 Port 9222
                 identityfile <The path to the private key you generated> such as: /home/sshuser/.ssh/id_rsa

  • Check that the file permissions are set properly on /home/sshuser/.ssh/config.  You can set the correct permissions by running the following command:

              chmod 644 ~/.ssh/config

Submitting your SSH key to CAF

  You must generate your SSH public/private key pair and upload the public key to https://www.codeaurora.org/.

  1. Login to your account on the CodeAurora website.
  2. Click on the tab entitled "SSH Keys".
  3. Click "Add a public key", enter a key title, paste the key in the appropriate field and click "Save".
  4. Send an e-mail to itpeople@codeaurora.org with the subject of: SSH Key for user: username@codeaurora.org
  5. In the e-mail please detail what project/repositories you need access to, if possible CC the project admins so they can approve your access.

  Once we verify with the project administrators that you should have access, we will grant it.

Update git config if necessary

  • If converting from a standard CAF project to gitolite you may need to update your git config file for the new project location.  

              git remote set-url origin git@git.codeaurora.org:<project path> such as: quic/la/device/common.git

Tags:
Created by Greg Stinocher on 2013/04/25 13:23
   
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 7.4.3 - Documentation