Friday, 9 October 2015

About SSH Key

SSH keys are a way to identify trusted computers, without involving passwords

Lets make our Computer Trusted
1. To check for existing SSH keys on computer
ls -al ~/.ssh

2. If there is no an existing public & private key pair listed (e.g. id_rsa.pub & id_rsa) then Generate SSH key to connect GitHub
     1) # This command creates a new ssh key, using provided
         ssh-keygen -t rsa -b 4096 -c "pradnya@sodelsolutions.com"
     2) since default settings are as they are, when prompted to "Enter a file in    which to save the key", just press Enter to continue
     3) You'll be asked to enter a passphrase
     4) you'll be given the id, of your SSH key

3. Add your SSH key to your account
     1) Copy the SSH key to your clipboard
         1] sudo apt-get install xclip
             #Downloads & installs xclip
         2] xclip -sel clip < ~/.ssh/id_rsa.pub
            #Copies the contents of the id_rsa.pub file to your clipboard
     2) Add the copied key to GitHub
         Settings -> SSH Key -> Add SSH Key -> Add Title -> Add Key to Key Field   -> Add Key -> Confirm Action by entering GitHub Password

Thursday, 11 December 2014

How to Set Up Git

This post assumes that you have git installed as well as have Github Account.

Set Up Git

There are two ways to configure git

1. using command
2. using text editor  

1. using command

- easiest way of configuring git is through the git config command.

git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"  

- we can see all of the configuration items that have been set by  
git config --list
user.name=Your Name
user.email=youremail@domain.com

2. using text editor

- this configuration information is stored in the configuration file, which you can optionally edit by hand with your text editor

nano ~/.gitconfig
[user]
         name = Your Name
         email = youremail@domain.com

[use Ctrl + x - to close editor]

There are many other options that you can set, but these are the two essential ones needed. If you skip this step, you'll likely see warnings when you commit to git.

How to install Git on Ubuntu 14.04

This post assumes that you are signed in as a non-root user.

Install Git with Apt

This is the fastest method, but the version may be older than the newest version. You can use the apt package management tools to update your local package index. Afterwords you can download & install the program:


sudo apt-get update
sudo apt-get install git