Friday, 23 February 2024

Install Git

* Install Git

$ sudo apt install git-all

* Connect to github.com using ssh in linux

- generate ssh key

$ ssh-keygen -t ed25519 -C "your_email@example.com"

+ enter ssh file name: id_ed25519

+ enter password, re password

- Start the ssh-agent in the background

$ eval "$(ssh-agent -s)"

- add your SSH private key to the ssh-agent.

$ ssh-add ~/.ssh/id_ed25519

- add config file

$ sudo nano config

Host github.com
  IdentityFile ~/.ssh/
id_ed25519

- add key in id_ed25519.pub to ssh key in guthub

- check ssh success

$ ssh -T git@github.com

* >> some error can happen

Refference: 

> https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

No comments:

Post a Comment

Golang Advanced Interview Q&A