Skip to content

Setup SSH key for git repository

genkey

sh
ssh-keygen -t rsa -b 4096 -C "your@email.com"

Add key

Start the ssh agent

On linux

sh
eval `ssh-agent -s`

On windows, go to services and start "OpenSSH Agent"

ssh-add

sh
ssh-add c:/Users/%USERNAME%/.ssh/<your_key>

Env GIT_SSH

Set the GIT_SSH env varialbe to the ssh executable

Add pulbic key to server

the content of this file : ssh-add c:/Users/%USERNAME%/.ssh/<your_key>.pub