Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating a gitlab ssh key from windows

Tags:

I've tried following this guide on generating an ssh key in order to use gitlab.

Before I know if I should generate a key I must check if there is one already like this:

type %userprofile%\.ssh\id_rsa.pub 

If it says this, then I must generate the key:

the system cannot find the path specified 

What is the next step? Because the guide doesn't say anything in case this is the message I get.

Edit: I've tried

ssh-keygen -t rsa -C "[email protected]" 

And I get

'ssh-keygen' is not recognized as an internal or external command,  operable program or batch file. 

Edit 2: I am on windows.

like image 307
Hadarsi320 Avatar asked Dec 14 '16 17:12

Hadarsi320


People also ask

How create SSH key and add to GitLab?

Creating SSH Key Step 2 − Now login to your GitLab account and click on the Settings option. Step 3 − To create SSH key, click on the SSH keys tab at left side of the menu. Step 4 − Now go to C drive, you will see the file with . pub extension which was generated in the first step.


2 Answers

ON windows if you have git for windows installed, run git-gui. Then click Help then click Show Ssh Key, then click Generate Key.

While you're at it, then copy to the clipboard, and then go to your Gitlab account page and add the SSH key to your Gitlab account's ssh settings.

like image 100
Warren P Avatar answered Oct 11 '22 15:10

Warren P


The intention here is for %userprofile% to be an environment variable present in your system that contains your actual user's home directory. Either check why this environment variable isn't set on your system and fix it, or for a quick fix, replace %userprofile% in the above command with your actual user's home directory.

like image 45
Asaph Avatar answered Oct 11 '22 15:10

Asaph