- generate ssh key:
ssh-keygen -t ed25519 -C "your_email@example.com"- add generated key to ssh client
ssh-add ~/.ssh/id_ed25519NOTE 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 git@github.comAfter this steps you can clone your repositories as
git clone git@github.com:username/repo.gitNOTE for repositories, that was downloaded earlier, you need update url:
git remote set-url origin git@github.com:username/your-repository.git