From abbb29b30c55fb44edd4f1eb0b87a8ce4a72a05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= Date: Thu, 22 Jan 2015 20:27:11 +0100 Subject: Update ssh doc with commands to copy the public key to the clipboard --- doc/ssh/ssh.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'doc/ssh/ssh.md') diff --git a/doc/ssh/ssh.md b/doc/ssh/ssh.md index d466c1bde72..f9ee627f1f5 100644 --- a/doc/ssh/ssh.md +++ b/doc/ssh/ssh.md @@ -18,4 +18,21 @@ Use the code below to show your public key. cat ~/.ssh/id_rsa.pub ``` -Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host. +Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host. + +Use code below to copy your public key to the clipboard. Depending on your OS you'll need to use a different command: + +**Windows:** +```bash +clip < ~/.ssh/id_rsa.pub +``` + +**Mac:** +```bash +pbcopy < ~/.ssh/id_rsa.pub +``` + +**Linux (requires xclip):** +```bash +xclip -sel clip < ~/.ssh/id_rsa.pub +``` -- cgit v1.2.1 From 7aa3f6053efd9c1e2db962f7146a13bdf3d147c9 Mon Sep 17 00:00:00 2001 From: Ewan Edwards Date: Wed, 4 Feb 2015 08:23:24 -0800 Subject: Consolidate the SSH topics into a single file, since the two available topics are quite short. Also correct some missing words, punctuation. --- doc/ssh/ssh.md | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 doc/ssh/ssh.md (limited to 'doc/ssh/ssh.md') diff --git a/doc/ssh/ssh.md b/doc/ssh/ssh.md deleted file mode 100644 index f9ee627f1f5..00000000000 --- a/doc/ssh/ssh.md +++ /dev/null @@ -1,38 +0,0 @@ -# SSH keys - -SSH key allows you to establish a secure connection between your computer and GitLab - -Before generating an SSH key, check if your system already has one by running `cat ~/.ssh/id_rsa.pub` If your see a long string starting with `ssh-rsa` or `ssh-dsa`, you can skip the ssh-keygen step. - -To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default. -It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. -Note that the password you choose here can't be altered or retrieved. - -```bash -ssh-keygen -t rsa -C "$your_email" -``` - -Use the code below to show your public key. - -```bash -cat ~/.ssh/id_rsa.pub -``` - -Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host. - -Use code below to copy your public key to the clipboard. Depending on your OS you'll need to use a different command: - -**Windows:** -```bash -clip < ~/.ssh/id_rsa.pub -``` - -**Mac:** -```bash -pbcopy < ~/.ssh/id_rsa.pub -``` - -**Linux (requires xclip):** -```bash -xclip -sel clip < ~/.ssh/id_rsa.pub -``` -- cgit v1.2.1