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