![Gitlab Gitlab](/uploads/1/2/6/1/126173971/823209266.png)
- Install Putty and related utilities
- Set system environment variable in Windows(Control PanelSystem and SecuritySystem --> 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%
You moved the key but you did not setup the proper file permissions, or did a proper setup of the ssh-agent. If you just generate a new key the gen will take care of that. When you generate is good to have at least a size of 2k, 4k if you want to access more secure environments (some services require minimum 4k). In the 'Parameters' section choose SSH2 DSA and press Generate. Move your mouse randomly in the small screen in order to generate the key pairs. Enter a key comment, which will identify the key (useful when you use several SSH keys). Type in the passphrase and confirm it. The passphrase is used to protect your key. You will be asked for it when.
Adding Ssh Key To Gitlab
Usage:
Gitlab Ssh Key Puttygen
- Start pagent.exe from Putty folder
- Add key to pageant.exe