github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/docs/Gerrit/lf-account.md (about)

     1  # Requesting a Linux Foundation Account
     2  
     3  Contributions to the Fabric code base require a Linux Foundation account.
     4  Follow the steps below to create a Linux Foundation account.
     5  
     6  ## Creating a Linux Foundation ID
     7  
     8  1. Go to the [Linux Foundation ID website](https://identity.linuxfoundation.org/).
     9  
    10  2. Select the option `I need to create a Linux Foundation ID`.
    11  
    12  3. Fill out the form that appears:
    13  
    14  4. Open your email account and look for a message with the subject line:
    15     "Validate your Linux Foundation ID email".
    16  
    17  5. Open the received URL to validate your email address.
    18  
    19  6. Verify the browser displays the message `You have successfully
    20     validated your e-mail address`.
    21  
    22  7. Access `Gerrit` by selecting `Sign In`:
    23  
    24  8. Use your Linux Foundation ID to Sign In:
    25  
    26  ## Configuring Gerrit to Use SSH
    27  
    28  Gerrit uses SSH to interact with your Git client. A SSH private key
    29  needs to be generated on the development machine with a matching public
    30  key on the Gerrit server.
    31  
    32  If you already have a SSH key-pair, skip this section.
    33  
    34  As an example, we provide the steps to generate the SSH key-pair on a Linux
    35  environment. Follow the equivalent steps on your OS.
    36  
    37  1. Create a key-pair, enter:
    38  
    39  ```
    40  ssh-keygen -t rsa -C "John Doe john.doe@example.com"
    41  ```
    42  
    43  **Note:** This will ask you for a password to protect the private key as it
    44  generates a unique key. Please keep this password private, and DO NOT
    45  enter a blank password.
    46  
    47  The generated key-pair is found in: `~/.ssh/id_rsa` and `~/.ssh/id_rsa.pub`.
    48  
    49  1. Add the private key in the `id_rsa` file in your key ring, e.g.:
    50  
    51  ```
    52  ssh-add ~/.ssh/id_rsa
    53  ```
    54  
    55  Once the key-pair has been generated, the public key must be added to Gerrit.
    56  
    57  Follow these steps to add your public key `id_rsa.pub` to the Gerrit
    58  account:
    59  
    60  1. Go to [Gerrit](https://gerrit.hyperledger.org/r/#/admin/projects/fabric).
    61  
    62  2. Click on your account name in the upper right corner.
    63  
    64  3. From the pop-up menu, select `Settings`.
    65  
    66  4. On the left side menu, click on `SSH Public Keys`.
    67  
    68  5. Paste the contents of your public key `~/.ssh/id_rsa.pub` and click
    69     `Add key`.
    70  
    71  **Note:** The `id_rsa.pub` file can be opened with any text editor. Ensure
    72     that all the contents of the file are selected, copied and pasted into the
    73     `Add SSH key` window in Gerrit.
    74  
    75  **Note:** The ssh key generation instructions operate on the assumtion that
    76  you are using the default naming. It is possible to generate multiple ssh Keys
    77  and to name the resulting files differently. See the [ssh-keygen](https://en.wikipedia.org/wiki/Ssh-keygen)
    78  documentation for details on how to do that. Once you have generated non-default
    79  keys, you need to configure ssh to use the correct key for Gerrit. In that case,
    80  you need to create a `~/.ssh/config` file modeled after the one below.
    81  
    82  ```
    83  host gerrit.hyperledger.org
    84   HostName gerrit.hyperledger.org
    85   IdentityFile ~/.ssh/id_rsa_hyperledger_gerrit
    86   User <LFID>
    87  ```
    88  where <LFID> is your Linux Foundation ID and the value of IdentityFile is the
    89  name of the public key file you generated.
    90  
    91  **Warning:** Potential Security Risk! Do not copy your private key
    92     `~/.ssh/id_rsa` Use only the public `~/.ssh/id_rsa.pub`.
    93  
    94  ## Checking Out the Source Code
    95  
    96  1. Ensure that SSH has been set up properly. See
    97     `Configuring Gerrit to Use SSH` for details.
    98  
    99  2. Clone the repository with your Linux Foundation ID (<LFID>):
   100  
   101  ```
   102  git clone ssh://<LFID>@gerrit.hyperledger.org:29418/fabric fabric
   103  ```
   104  
   105  You have successfully checked out a copy of the source code to your local
   106  machine.