* 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
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