Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page will guide you through how to setup SSH keys to interact with the Valor git repositories without asking for a password every time.

## Background

### SSH vs HTTPS

### SSH keys and why they are important

#### SSH key encryption types

### What is an SSH config?

...

Setup

...

  1. Create an environment variable to store your git username

...

GIT_USERNAME=mray190

...


...

  1. Create an SSH key

...

ssh-keygen -t ed25519

...


...

  1. Edit your

...

  1. ~/.ssh/

...

  1. config. Replace GIT_USERNAME with your username

...

Host git.valor6800.com

...


    HostName git.valor6800.com

...


    Port 6822
    User GIT_USERNAME
    IdentityFile ~/.ssh/id_ed25519

...


...

  1. Copy your SSH public key into your clipboard

...

cat ~/.ssh/id_ed25519.pub | clip

...

  1. Paste your SSH public key into GitLab's SSH key settings: https://git.valor6800.com/-/profile/keys

...

Putting it all together

...

  1. Create a script called

...

  1. ./setup_git.

...

  1. sh

...

  1. Give your computer access to run the script:

...

  1. chmod +x ./setup_git.

...

  1. sh

...

  1. Paste the contents into the script, and run with:

...

  1. ./setup_git.sh GIT_

...

  1. USERNAME

Script contents:
```bash

#!/bin/bash

...


...


GIT_USERNAME=$1

...


ssh-keygen -q -t ed25519 -N '' <<< $'\ny' >/dev/null 2>&1

...


cat > ~/.ssh/config <<EOL

...


Host git.valor6800.com

...


    HostName git.valor6800.com

...


    Port 6822
    User ${GIT_USERNAME}

...


    IdentityFile ~/.ssh/id_ed25519

...


EOL

...


cat ~/.ssh/id_ed25519.pub | clip

...