- generate ssh key:
ssh-keygen -t ed25519 -C "[email protected]"
- add generated key to ssh client
ssh-add ~/.ssh/id_ed25519
NOTE if you got error:
Could not open a connection to your authentication agent.
run next command:
eval "$(ssh-agent -s)"
and will try again
-
upload public key to github
-
authenticate to github via ssh
ssh -T [email protected]
After this steps you can clone your repositories as
git clone [email protected]:username/repo.git
NOTE for repositories, that was downloaded earlier, you need update url:
git remote set-url origin [email protected]:username/your-repository.git