Requesting a Linux Foundation Account

Contributions to the Zephyr kernel code base require a Linux Foundation account. Follow the steps below to create a Linux Foundation account.

Creating a Linux Foundation ID

  1. Go to the Linux Foundation ID website.

  2. Select the option I need to create a Linux Foundation ID.

    linuxfoundation.org identity page
  3. Fill out the form that appears:

    New account form
  4. Open your email account and look for a message with the subject line: “Validate your Linux Foundation ID email”.

  5. Open the received URL to validate your email address.

  6. Verify the browser displays the message You have successfully validated your e-mail address.

  7. Access Gerrit by selecting Sign In:

    Gerrit without being signed in
  8. Use your Linux Foundation ID to Sign In:

    Gerrit sign in screen

Configuring Gerrit to Use SSH

Gerrit uses SSH to interact with your Git client. A SSH private key needs to be generated on the development machine with a matching public key on the Gerrit server.

If you already have a SSH key-pair, skip this section.

As an example, we provide the steps to generate the SSH key-pair on a Linux environment. Follow the equivalent steps on your OS.

  1. Create a key-pair, enter:

    $ ssh-keygen -t rsa -C "John Doe john.doe@example.com"
    

    Note

    This will ask you for a password to protect the private key as it generates a unique key. Please keep this password private, and DO NOT enter a blank password.

    The generated key-pair is found in: ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.

  2. Add the private key in the id_rsa file in your key ring:

    $ ssh-add ~/.ssh/id_rsa
    

Once the key-pair has been generated, the public key must be added to Gerrit.

Follow these steps to add your public key id_rsa.pub to the Gerrit account:

  1. Go to Gerrit.
  2. Click on your account name in the upper right corner.
  3. From the pop-up menu, select Settings.
  4. On the left side menu, click on SSH Public Keys.
  5. Paste the contents of your public key ~/.ssh/id_rsa.pub and click Add key.

Note

The id_rsa.pub file can be opened with any text editor. Ensure that all the contents of the file are selected, copied and pasted into the Add SSH key window in Gerrit.

Warning

Potential Security Risk! Do not copy your private key ~/.ssh/id_rsa Use only the public ~/.ssh/id_rsa.pub.

Checking Out the Source Code

  1. Ensure that SSH has been set up properly. See Configuring Gerrit to Use SSH for details.

  2. Clone the repository with your Linux Foundation ID (<LFID>):

    $ git clone ssh://<LFID>@gerrit.zephyrproject.org:29418/zephyr zephyr-project
    

You have successfully checked out a copy of the source code to your local machine.

Important

Linux users need to download the Zephyr SDK even after successfully cloning the source code. The SDK contains packages that are not part of the Zephyr Project. See Installing the Zephyr Software Development Kit for details.

Gerrit Commit Message Hook

The Gerrit server provides a precommit hook to autogenerate the Change-Id which is one time use. Use the following command as an example:

$ scp -p -P 29418 <LFID>@gerrit.zephyrproject.org:hooks/commit-msg LOCALREPODIR/.git/hooks/