How to Create and Setup a GitLab Account

This article describes the steps for registering and setting up an account with http://gitlab.com

Gitlab Account Setup

Register an Account with Gitlab

  1. Go to https://gitlab.com/users/sign_up

  2. Enter the required information, and click Register.

Note Your Gitlab Username

  1. Click the icon in the upper-right corner.

  2. Your gitlab username is indicated by the @ symbol. If your username is @sampleUserName, then you will enter sampleUserName when setting up your git repository in Appvance IQ.

Create an SSH Key

  1. Open a command prompt or terminal

  2. Enter ssh-keygen -m pem and press Enter

  3. When Enter file in which to save the key, press Enter to take the default location and file name

  4. Leave password blank when prompted, and click Enter

  5. A message appears: Your identification has been saved in…

  6. Enter cd and paste the path indicated in the above message

  7. Once in the .ssh directory, enter more id_rsa (or the custom name you gave the .pub file)

  8. Copy the key between -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----

  9. Example Output of Terminal Commands

    1. Slight output variation with Windows using same commands

    2. Note: User-generated keys may contain OPENSSL instead of RSA.

      Janes-Mac-mini:.ssh janesmith$ ssh-keygen -m pem
      Generating public/private rsa key pair.
      Enter file in which to save the key (/Users/janesmith/.ssh/id_rsa): 
      Enter passphrase (empty for no passphrase): 
      Enter same passphrase again: 
      Your identification has been saved in /Users/janesmith/.ssh/id_rsa.
      Your public key has been saved in /Users/janesmith/.ssh/id_rsa.pub.
      The key fingerprint is:
      SHA256:lXVJ7la3Sntrx+/dUo2HFC+qWUjg8t5dQxU1K1A97J0 janesmith@Janes-Mac-mini.local
      The key's randomart image is:
      +---[RSA 3072]----+
      |     o.oo  .oo=++|
      |        .  o.oo++|
      |    .  .=Z=  .o=*|
      |      . ...  .=P=|
      |       oS. . =o=.|
      |     . + .  +.B +|
      |       . . = + * |
      |        .J . o .*|
      |              .+R|
      +----[SHA256]-----+
      Janes-Mac-mini:.ssh janesmith$ more id_rsa
      -----BEGIN RSA PRIVATE KEY-----
      MIIG5AIBAAKCAYEAswpdEh+nJuJ0Y7Qxndshkr0xvpMDq031dpLp4J6YiM3l0BJ6
      [...lines removed...]
      k7ilG41CtKjLeOOBgP4Rg7ZHo04FgbzZaH1fWuwlFYqJpMYrsV2rtA==
      -----END RSA PRIVATE KEY-----
      id_rsa (END)

Add SSH Key in Gitlab

  1. Return to gitlab.com in your browser

  2. Click the icon in the upper-right corner, and select Preferences

  3. Select SSH Keys

  4. Paste the copied text in the Key box and click Add Key

Create a Gitlab Token

  1. Click the icon in the upper-right corner, and select Preferences

  2. Click Access Tokens

  3. Enter a name in the Token name box

  4. Check all scopes which apply (read and write required at minimum), and click Create personal access token

  5. Copy the generated personal access token and/or save in a password vault
    Important: You will need this token when setting up your git repository access in Appvance IQ