Configuration Git to work with SSH
Step 1: Installing Git
We can install Git without having to add any repositories.
apt-get install git
Step 2: Configuring Git
git config –global user.name “John Appleseed”
git config –global user.email “email@example.com”
Step 3: SSH and Git
- Check if any SSH key exists
- Generate SSH key in your .ssh directory
NOTICE: If you use `sudo` to generate SSH key, then you cannot use `git` command without `sudo`. Unless, you have to use `sudo` when working with `git`, try to avoid it
- Enable SSH-agen
- Add your SSH key to the SSH agent
- Add your public key to your GitHub account
- Testing your connection