# Prepare your environment This page is a quick-reference checklist for setting up a new machine to contribute to OSM via GitLab. ## 1. Create an SSH key ```bash ssh-keygen ``` Accept the default path (`~/.ssh/id_rsa`). Add an optional passphrase. ## 2. Add your public key to GitLab 1. Go to [https://osm.etsi.org/gitlab/](https://osm.etsi.org/gitlab/) and sign in. 2. Navigate to **Edit Profile → SSH Keys**. 3. Paste the contents of `~/.ssh/id_rsa.pub` into the **Key** field. 4. Set a title and an expiry date (maximum one year), then click **Add key**. ## 3. Configure `~/.ssh/config` ```text Host osm.etsi.org Hostname osm.etsi.org User git IdentityFile ~/.ssh/id_rsa PubkeyAcceptedAlgorithms +ssh-rsa HostkeyAlgorithms +ssh-rsa ``` Test the connection: ```bash ssh -p 29419 osm.etsi.org ``` ## 4. Configure Git ```bash git config --global user.name git config --global user.email ``` The username and email must match your GitLab profile. **Note:** Your email address will be visible on commits. If you'd like to keep it private, you can use a masked address — e.g. if your email is `name@company.com`, set `user.email` to `hidden@company.com`. This lets other users identify you by username while Git stats still track your company's contributions by domain. If you use the same machine for other projects, you can restrict these settings to a specific repository: ```bash cd git config --local user.name git config --local user.email ``` Verify: ```bash git config -l ``` ## 5. Clone a project ```bash git clone ssh://git@osm.etsi.org:29419/osm/.git ``` To clone all the main OSM projects at once: ```bash mkdir -p ~/OSM/ cd ~/OSM BRANCH=master for PROJECT in common devops IM LCM MON NBI NG-SA NG-UI osmclient RO tests do git clone ssh://git@osm.etsi.org:29419/osm/${PROJECT}.git git -C ${PROJECT} checkout ${BRANCH} done ``` You are now ready to contribute. See [Contributing Code](07-contributing-code.md) for the full contribution workflow.