-
Install Putty and related utilities
-
Set system environment variable in Windows(Control Panel\System and Security\System --> and clicking on "Advanced system settings" in the left pane. Then click on "Environment Variables") GIT_SSH=%path_to_plink.exe% (Note plink.exe goes into wherever you installed Putty)
-
Generate a ssh key using puttygen.exe (ssh2-rsa, 4096, comment=GitLab, and set a passphrase)
-
Add key to pageant.exe and the public key to your GitLab profile
-
Ensure you start a new command shell so that git recognizes the GIT_SSH value
-
Try these two commands to check connection first. This should give you a popup window that authenticates connection
-
set Git putty [email protected]:%user%/%repo.git%
Usage:
- Start pagent.exe from Putty folder
- Add key to pageant.exe