L&D series: Generate GitHub SSH key

Ferawati Hartanti Pratiwi
2 min readMay 22, 2022

--

https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHyhjzDPas8rGECrExUx8jgbGYDIe35GZ820tNK0L_vtn9-Sb8QiBZbR0wOmmGeLikaWw&usqp=CAU

Learning and Development chapter 17.

What is SSH key?

Secure Shell or known as SSH key is a key that have access for credential used within the SSH protocol.

Generate SSH key

  • Open terminal then type ssh-keygen -t rsa.
  • Press enter on keyboard. Input y if ssh file already exist.

Where to store the key?

We can store at GitHub setting also GitHub secret at the same time.

Store id_rsa.pub to GitHub settings:

  • Input SSH name in Title.
  • Paste the SSH key from pbcopy command.
  • Click Add SSH key button.
  • Input GitHub password.

We only can delete the added SSH key, but we can add multiple SSH key.

Store id_rsa to GitHub secret:

  • On terminal, type pbcopy < ~/.ssh/id_rsa.
  • Go to our repo link + /settings/secrets/actions.
  • Click New repository secret button.
  • Input Name for secret name.
  • Input token in Value field.
  • Click Add secret button.
https://miro.medium.com/max/1400/1*1ItkymxzzzsLCP3rDdaXrA.png

Do you still use the password for github auth? — MperMperPisang

Reference

--

--

Ferawati Hartanti Pratiwi
Ferawati Hartanti Pratiwi

Written by Ferawati Hartanti Pratiwi

Continuously striving to elevate QA standards with a quality-focused mindset

No responses yet