Step 1 List All SSH Files
List All SSH FilesList all SSH files to double check and make sure not to overwrite any existing SSH keys.
Step 2 Go into Directory
Go into DirectoryPoint your command line terminal to the right folder so we can generate a new SSH private key for your GitHub account.
Step 3 Generate a SSH Private Key
Generate a SSH Private KeyUse an SSH generator to generate a key and attach it to your existing email address with the one on your GitHub account. (Make sure to replace [email protected] with your GitHub account's email)
Step 4 Go Through the Generator Sequence
Go Through the Generator SequenceWhile going through the generator sequence you can leave the passphrase blank (if on your personal machine) or for more security fill in a passphrase on a work shared machine. For tutorial purposes choose the file name github_rsa. It'll be easier to follow along with other GitLab tutorials.
Step 5 Make Sure SSH Agent is On
Make Sure SSH Agent is OnTurn on the SSH agent in the background with the following command.
Step 6 Add your GitLab Private Key
Add your GitLab Private KeyAdd your SSH private key to the ssh-agent that you just previously turned on in the last step.
Step 7 Copy Your Private Key Add to GitLab
Copy Your Private Key Add to GitLabAdd your private key to your GitLab account.