Setup the ssh connection with github

Generate the ssh key 

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

Save the ssh key
 
> Enter a file in which to save the key (/Users/you/.ssh/id_ed25519): [Press enter]
 

Type a secure passphrase
 
> Enter passphrase (empty for no passphrase): [Type a passphrase] > Enter same passphrase again: [Type passphrase again]
 

Add ssh key to ssh-agent  

$ eval "$(ssh-agent -s)"
 
$ open ~/.ssh/config if not exist, create it.
 
$ vi ~/.ssh/config

 
Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519 
 
Note: If you see an error like this
/Users/USER/.ssh/config: line 16: Bad configuration option: usekeychain
 

 add IgnoreUnknown UseKeychain in .ssh/config
 
 

Copy the SSH public key to your clipboard.

more ~/.ssh/id_ed25519.pub
 

Select an copy your pub key and place in your github account


 

In the user settings sidebar, click SSH and GPG keys. 

Click New SSH key or Add SSH key.  

Set the title any name you want.

Paste your key into the "Key" field. 

click Add SSH Key and type your password.

Open the terminal and test your ssh connection.

$ ssh -T git@github.com

 

Verify that the fingerprint in the message you see matches GitHub's RSA public key fingerprint. If it does, then type yes:

 

Now you are connect ssh with github.


Ref: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh



 

   

 


Comments

Popular posts from this blog

How to point DNS form Godaddy Domain to AWS Route 53

How to setup AWS VPC Peering (VPC to VPC)

AWS Root Account MFA setup