Browse Source

Updated read me

With step by step key generation and how to add this key to the ssh agent permanently.
Joachim Marthinsen Giæver 7 years ago
parent
commit
dfab1accf0
1 changed files with 14 additions and 8 deletions
  1. 14 8
      README.md

+ 14 - 8
README.md

@@ -11,15 +11,21 @@ Regards to the change in software where we now support https and ssh with git, a
 
 
 ## Do I need keys now?
-- Yes you do, so please read
-    * [how to generate keys](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/) on GitHub (but dont add it there, so skip step 3 in Adding your SSH key...)
-    * Print and copy your key:
-```
-$ cat ~/.ssh/KEYNAME                      # change KEYNAME to what you chose in previous step
-$ sudo apt-get install xclip              # Install xclip
-$ xclip -sel clip < ~/.ssh/KEYNAME.pub    # change KEYNAME and continue to next step
+Yes you do, so please follow the steps:
+
+* Generate a new key `$ ssh-keygen -t rsa -b 4096 -C "your@email.com`
+* Complete the key generation and remember where your key is stored. Its normally stored in ~/.ssh/id_rsa, but for me who has keys on many different hosts normally gives each key a unique name, i.e `~/.ssh/id_git_giaever_org`.
+* Create (or edit if exists) the config file for ssh: `$ vim ~/.ssh/config` and create the Host-entry in the file
+
+```vim
+Host git.giaever.org
+    HostName git.giaever.org
+    User giaever
+    IdentityFile <my ssh key file>
 ```
-    * and [add your key here](https://git.giaever.org/user/settings/ssh) (login required) by pressing CTRL+v
+
+* Now print your public key: `$ cat <my ssh key file>.pub`
+* Copy the printed content and paste that text where you [add your key](https://git.giaever.org/user/settings/ssh) (login required) by pressing CTRL+v. Please give the key a good description as you may have several keys on different computers.
 
 # Outdated info:
 * Clone your repo, to your local disk (```note``` the extra /git-directory):