Commit bce482a5 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'patch-1' into 'master'

fixed Windows commands in SSH Help.

The current commands shown don't work in Command Line, or PowerShell. Command Line doesn't recognize the `~` character as the home directory, the `<` character is reserved in PowerShell, and `cat` doesn't work in Command Line. This commit provides commands that will work for both the Command Line, and PowerShell.

See merge request !2694
parents e63941ab b92ce40d
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
An SSH key allows you to establish a secure connection between your An SSH key allows you to establish a secure connection between your
computer and GitLab. Before generating an SSH key in your shell, check if your system computer and GitLab. Before generating an SSH key in your shell, check if your system
already has one by running the following command: already has one by running the following command:
**Windows Command Line:**
```bash
type %userprofile%\.ssh\id_rsa.pub
```
**GNU/Linux/Mac/PowerShell:**
```bash ```bash
cat ~/.ssh/id_rsa.pub cat ~/.ssh/id_rsa.pub
``` ```
...@@ -25,6 +31,12 @@ press enter to use the default. If you use a different name, the key will not ...@@ -25,6 +31,12 @@ press enter to use the default. If you use a different name, the key will not
be used automatically. be used automatically.
Use the command below to show your public key: Use the command below to show your public key:
**Windows Command Line:**
```bash
type %userprofile%\.ssh\id_rsa.pub
```
**GNU/Linux/Mac/PowerShell:**
```bash ```bash
cat ~/.ssh/id_rsa.pub cat ~/.ssh/id_rsa.pub
``` ```
...@@ -36,9 +48,14 @@ with your username and host. ...@@ -36,9 +48,14 @@ with your username and host.
To copy your public key to the clipboard, use the code below. Depending on your To copy your public key to the clipboard, use the code below. Depending on your
OS you'll need to use a different command: OS you'll need to use a different command:
**Windows:** **Windows Command Line:**
```bash
type %userprofile%\.ssh\id_rsa.pub | clip
```
**Windows PowerShell:**
```bash ```bash
clip < ~/.ssh/id_rsa.pub cat ~/.ssh/id_rsa.pub | clip
``` ```
**Mac:** **Mac:**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment