Git Clone Repo via SSH
Steps:
Generate SSH Key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519Get the
PUBLICkey and add it toGithuborGitlaborother-Git-itteration
cd ~/.ssh/
cat key.pubNow click New SSH key on top. Type name of your key (something like Work MacBook) and paste contents of your public key.
Let’s force your machine to use proper key for Github SSH connection. Go back to your terminal:
vim ~/.ssh/configPaste config:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github
PreferredAuthentications publickeyLet’s check Github connection:
ssh -T [email protected]If everything is OK. you should get:
Hi $USERNAME! You've successfully authenticated, but GitHub does not provide shell access.
Last updated