Skip to content

Instantly share code, notes, and snippets.

@njxqlus
Last active July 24, 2020 14:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njxqlus/3066306a1b37b7a05b1e801b2beea01c to your computer and use it in GitHub Desktop.
Save njxqlus/3066306a1b37b7a05b1e801b2beea01c to your computer and use it in GitHub Desktop.
GitLab SSH Windows 10 with Putty
  1. Install Putty and related utilities

  2. 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)

  3. Generate a ssh key using puttygen.exe (ssh2-rsa, 4096, comment=GitLab, and set a passphrase)

  4. Add key to pageant.exe and the public key to your GitLab profile

  5. Ensure you start a new command shell so that git recognizes the GIT_SSH value

  6. Try these two commands to check connection first. This should give you a popup window that authenticates connection

  7. set Git putty git@gitlab.com:%user%/%repo.git%

Usage:

  1. Start pagent.exe from Putty folder
  2. Add key to pageant.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment