Git by Examples

Basic Settings

Configuration

 

 

 

 

Setup SSH key

First setup user's email on your local Ubuntu machine:

$git config --global user.email “my@email.loc”

 

Then generate public and private key in your local Ubuntu machine:

$ssh-keygen -t rsa -C "my@email.loc"

Generating public/private rsa key pair.
Enter file in which to save the key (/home/frob/.ssh/id_rsa): (leave empty if want default id_rsa file)
Enter passphrase (empty for no passphrase): (leave empty if you dont want password)
Your identification has been saved in /home/frob/.ssh/id_rsa.
Your public key has been saved in /home/frob/.ssh/id_rsa.pub.
The key fingerprint is:
56:5f:c1:cb:ed:0a:d6:15:49:af:23:d9:3c:b1:89:ca my@email.loc
The key's randomart image is:
+--[ RSA 2048]----+
|           ..... |
|            ..o. |
|          ...+...|
|         o .o=o= |
|        S ..+oO  |
|       . .o....o |
|         .E. .   |
|            .    |
|                 |
+-----------------+

 

this in UBUNTU generates two files:

  1. /home/frob/.ssh/id_rsa   -which is private SSH key
  2. /home/frob/.ssh/id_rsa.pub   -which is public SSH key