Created
October 3, 2020 18:43
-
-
Save badhonhitech/2c59e47aeb70d383c908991dc8430b8d to your computer and use it in GitHub Desktop.
Day 9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Part 1 | |
# To Install latest Git using PPA run this command: | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt update | |
sudo apt install git | |
# To check Git version run this command: | |
git --version | |
# To Configure Git run this command: | |
sudo git config --global user.name "TypeYourName" | |
sudo git config --global user.email "TypeYourEmail" | |
# To check Git configuration settings run this command: | |
git config --list | |
# Part 2 | |
# Checking for existing SSH keys | |
ls -al ~/.ssh | |
# If you do not see any file name "id_rsa.pub" into a list that means your Ubuntu do not have existing SSH key. | |
# if you see any file name "id_rsa.pub" into a list that means you Ubuntu have existing SSH keys. | |
# Generating a new SSH key and adding it to the ssh-agent | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
cat /home/school/.ssh/id_rsa.pub | |
# copy the key and add your new SSH key to your GitHub account visit: https://help.github.com/en/articles/adding-a-new-ssh-key-to-your-github-account | |
# Checking for existing SSH keys | |
ls -al ~/.ssh | |
# Now you see a file name "id_rsa.pub" into a list that means you Ubuntu now have existing SSH key. | |
# Testing your SSH connection | |
ssh -T [email protected] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment