c4d8b08b8b26df8417a833ae35ab6a67af6c2a37
[AGL/documentation.git] / docs / 6_How_To_Contribute / 1_Getting_Linux_Foundation_account.md
1 ---
2 title: Getting Linux Foundation account
3 ---
4
5 In order to participate in the development of the Automotive Grade Linux
6 project, you will need a Linux Foundation account. You will need to use
7 your LF ID to access to all the AGL community development tools,
8 including [Gerrit](http://gerrit.automotivelinux.org/),
9 [Jira](https://jira.automotivelinux.org/) and the
10 [Wiki](https://wiki.automotivelinux.org/) (for editing, only).
11
12 **NOTE:** Further information about Contributing to the AGL Distro
13 available at [AGL wiki](https://wiki.automotivelinux.org/agl-distro/contributing).
14
15 ## Creating Linux Foundation ID
16
17  1. Go to the [Linux Foundation ID website](https://identity.linuxfoundation.org/).
18
19  2. Select the option `I need to create a Linux Foundation ID`, and fill
20  out the form that appears. (It is advised to authenticate through email
21  instead of logging through Facebook/Google/Github.)
22
23  3. Wait a few minutes, then look for an email message with the subject
24  line: `Validate your Linux Foundation ID email`.
25
26  4. Open the received URL to validate your email address.
27
28  5. Verify that your browser displays the message  ``You have
29  successfully validated your e-mail address``.
30
31  6. Access [Gerrit](http://gerrit.automotivelinux.org/) by selecting
32  ``Sign In``, and use your new Linux Foundation account ID to sign in.
33
34 ## Configuring Gerrit to Use SSH
35
36 Gerrit uses SSH to interact with your Git client. If you already have an SSH
37 key pair, you can skip the part of this section that explains how to generate one.
38
39 What follows explains how to generate an SSH key pair in a Linux environment ---
40 follow the equivalent steps on your OS.
41
42 First, create an SSH key pair with the command:
43
44  ```sh
45  $ ssh-keygen -t rsa -C "John Doe john.doe@example.com"
46  ```
47
48 **Note:** This will ask you for a password to protect the private key as
49 it generates a unique key. Please keep this password private, and DO NOT
50 enter a blank password.
51
52 The generated SSH key pair can be found in the files ``~/.ssh/id_rsa`` and
53 ``~/.ssh/id_rsa.pub``.
54
55 Next, add the private key in the ``id_rsa`` file to your key ring, e.g.:
56
57  ```sh
58  $ ssh-add ~/.ssh/id_rsa
59  ```
60
61 Finally, add the public key of the generated key pair to the Gerrit
62 server, with the following steps:
63
64 1. Go to [Gerrit](http://gerrit.automotivelinux.org/).
65
66 2. Click on your account name in the upper right corner.
67
68 3. From the pop-up menu, select ``Settings``.
69
70 4. On the left side menu, click on ``SSH Public Keys``.
71
72 5. Paste the contents of your public key ``~/.ssh/id_rsa.pub`` and click
73    ``Add key``.
74
75 **Note:** The ``id_rsa.pub`` file can be opened with any text editor.
76 Ensure that all the contents of the file are selected, copied and pasted
77 into the ``Add SSH key`` window in Gerrit.
78
79 **Note:** The SSH key generation instructions operate on the assumption
80 that you are using the default naming. It is possible to generate
81 multiple SSH keys and to name the resulting files differently. See the
82 [ssh-keygen](https://en.wikipedia.org/wiki/Ssh-keygen) documentation for
83 details on how to do that. Once you have generated non-default keys, you
84 need to configure SSH to use the correct key for Gerrit. In that case,
85 you need to create a ``~/.ssh/config`` file modeled after the one below.
86
87  ```sh
88 host gerrit.automotivelinux.org
89   HostName gerrit.automotivelinux.org
90   IdentityFile ~/.ssh/id_rsa_automotivelinux_gerrit
91   User <LFID>
92 ```
93
94 `<LFID>` is your Linux Foundation ID and the value of IdentityFile is the
95 name of the public key file you generated.
96
97 **Warning:** Potential Security Risk! Do not copy your private key
98 ``~/.ssh/id_rsa``. Use only the public ``~/.ssh/id_rsa.pub``.
99
100