Gitlab Generate Ssh Key Windows

  1. Setup Ssh Keys Gitlab
  2. Gitlab Ssh Keys Windows
  3. Gitlab Windows Ssh
  4. Create Ssh Key For Gitlab
  5. Add Ssh Key Gitlab

Few easy steps to add new ssh keys to syncronize a computer with your Github/Gitlab/GitWathever accounts so you can start managing your versions.

Git page: https://git-scm.com/

Git for Windows comes with openssh, and that should be enough, in a git bash session. Ssh-keygen -t rsa See more at GitHub (that will apply for GitLab as well) 'Generating a new SSH key and adding it to the ssh-agent' The OP Petar Yakov reports having to register the password of their GitLab account in the Credential Manager. I use this pair to connect via Ssh to my GitLab repository and all works fine. I decided to create a Ubuntu VM via VirtualBox on the same machine, then I generated a new ssh keys pair into the VM using. Ssh-keygen -t rsa -C '[email protected]' -b 4096 with the same mail of windows10's domain.


We will need to create a key pair, a public for the Git server and a private for the computer. And then add the key into our Gitlab or Github account.

Gitlab windows ssh
  • Generating a new SSH key and adding it to the ssh-agent - GitHub Docs After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.
  • First we need to generate key pair. Type this command on Git Bash: ssh-keygen -t rsa. For now, we can just press Enter to use default key name and empty passphrase. ‘idrsa’ is the private key, and ‘idrsa.pub’ is the public key. Next we want to put the public key to the remote server.

Setup Ssh Keys Gitlab

Generate the ssh pair and save the private one in the computer

I use PuTTYgen, you can download it here choose puttygen.exe (a RSA and DSA key generation utility)

Gitlab Generate Ssh Key Windows

Once is opened:

  1. Click Generate.
  2. Move the mouse through the blank area
  3. (optional) Change Key comment field so you can identify the key i.e. home-desktop
  4. Click Conversions > Export OpenSSH key on the toolbar
  5. Save it into ~/.ssh/my_custom_key_name
  6. Add the brand new created key entering (ONLY TESTED USING GIT BASH):
    • eval $(ssh-agent -s) that returns something like Agent pid 123456.
    • Then ssh-add ~/.ssh/my_custom_key_name returning Identity added: /c/...blablabla.

If you need acess to two different git accounts, repeat the process by saving the key with a new name

Gitlab Ssh Keys Windows

Add the public key to Gitlab or Github

Gitlab Windows Ssh

  1. Copy the public key you’ve created (is under the text Public key for pasting into OpenSSH authorized_keys file).
  2. Open your Github or Gitlab account and go into SSH keys settings screen.
    • GitLab: https://gitlab.com/profile/keys/
    • GitHub: https://github.com/settings/keys
  3. Create a New SSH key by pasting the content copied in step 1.

Create Ssh Key For Gitlab

GRATZ! Now you can start working with Git!

Add Ssh Key Gitlab

Common ssh error