STEP 1 - INSTALLING GIT BASH
Open this link and then select your operating system, in this case windows and then install.
STEP 2 - SETTING UP GIT BASH
Open the downloaded file.
Click on next button to select components (to be safe make sure all components are ticked). Then on clicking next select the default editor (Visual Studio is recommended -I could be biased {inserts laughing emojis}).
Click on next until you get to the install button.
STEP 3 - CONNECTING GIT BASH TO YOUR GITHUB ACCOUNT
Open git bash (duuh!)
VERSION CHECK
Run the command git --version
CONFIGURATION
First, configure the username by running the command
git config --global user.name "john doe"
Then, configure the email by running the command
git config --global user.email "johndoe@gmail.com"
NB Ensure this email is the one linked to your github account.
Now we have to confirm whether the configuration was indeed successful (yk the drill).
Run the command
git config --list
You should see your username and email somewhere in the output.
GENERATING SSH KEY
Now we need to generate an SSH key which will be very 'key'/important to create and agent that will connect us to our github account.
Now run this command
ssh-keygen -t ed25519 -C "johndoe@gmail.com" (ensure it's your user email).
Now we have generated an SSH key yaay!
CREATING THE AGENT
Run this command
eval "$(ssh-agent -s)"
Voila! We have the agent.
Now what's remaining is to add our identity to gitbash and then connect it to github.
ADDING IDENTITY TO GIT BASH
This identity is specific to your email, which, remember is connected to your github account.
Run this command
ssh-add ~/.ssh/id_ed25519
CONNECTING TO GITHUB ACCOUNT
There is the SSH key that we generated up there. Now this key is linked to your user email, we need that key for this step.
You can get it in two ways:
Run the command
cat ~/.ssh/id_ed25519.pub
And copy that long code given as the outputYou could also do it manually by following the path given when this command
ssh-keygen -t ed25519 -C "johndoe@gmail.com"was run.
You will find the path somewhere in there and it looks like this
Your public key has been saved in /c/Users/john/.ssh/id_ed25519.pub
Follow that path and open the "id_ed25519.pub" file with a code editor and copy that long text/code.
Now that we have this key fingerprint, we are set!
Open github and log in => user navigation => settings => SSH and GPG keys => New SSH key => paste the key fingerprint text under "key" => add SSH key.
And we are doooonnnneeeee!!!!!!!
Top comments (0)