Installing GitHub on a MacBook with an Intel, Ultra, or Ultra-2 chip.

What is GitHub, and How to Install it on Mac based system chips such as Ultra ?

GitHub as we all know, is an online cloud storage for codes (programming codes), which enables developers to create, manage, and store their codes, while giving them the flexibility to collaborate with one another.

Developers, Security Researchers, Penetration Testers, IT professionals, and more , can view these codes, pull, clone, and contribute to these repositories if they are made public, by the author and owner of the GitHub repository.

 HERE IS HOW TO SETUP GITHUB REMOTE PUSH VIA SSH ON YOUR MAC:

To get GitHub setup on your MacBook, Mac Intel, Ultra, and Ultra-2 chip-based computer, here are the simple steps you should follow.

STEP-01:

Open your terminal and type the command below to check if there are instances of ssh installed on any mac you are using.

ls -al ~/ .ssh
step-01.png
                checking if there are instances of SSH installed on our computer. Image-source: Fixitgearware

reason is to ensure that we do not override existing ssh configuration running on your computer. If there are no  ssh configuration created, execute the command in “Step 2”, otherwise skip to “Step 3”.

STEP-02:

If there are no instances of SSH, then you are required to create ssh on your mac. This can be achieved, by  typing the command below.

mkdir ~/ .ssh

The command above, will enable us to create or make an SSH directory, on our local machine.

step-02.png
                                  creating the ssh directory on our mac computer. Image-source: Fixitgearware

STEP-03:

Next, we want to generate our SSH keys. To do so, type the command below.  Replace the email “[email protected]”  in the parathesis, with the email associated with your GitHub account.

ssh-keygen -t ed25519 -C “[email protected]”  
step-03&step-04.png
 Step-03: creating the SSH keys & Step-04: providing the path and file name for your ssh keys. Image-source: Fixitgearware

STEP-04:

After executing the command in “STEP-03”, you will be prompted to provide the path you want your ssh keys to be stored. These ssh keys comprises of both the “private keys & public keys (which are both stored in the ssh directory of your Mac computer), and the public key (you will be inserting in the ssh tab of your GitHub account).

To achieve this,  type the path below, replace “fixitgearwaresecurity” with the name of your computer or user account, and  “labfile01” with the name of your choice, you want the command to name your “ssh-keys (both public and private keys). After this is done,  hit the “enter” key on your keyboard.

/Users/fixitgearwaresecurity/.ssh/id_ed25519_labfile01

N.B: “fixitgearwaresecurity” would be the name of the current user or user account of your mac computer.

STEP-05:

When that is done, you will be asked to provide a paraphrase, this paraphrase is like a password, to provide additional protection layer and security for your GitHub SSH login.

Provide a strong paraphrase and store it somewhere only you can access it, as you would be prompted from time to time to provide the paraphrase, why trying to login or clone a repository.

Step-05.png
                 After providing the paraphrase the output of your terminal should be as shown above. Image-source: Fixitgearware

 

STEP-06:

Now we are done doing the first Five(5) stages of the configurations, next we want to do, is to get our SSH agent running. To do that, we type the command below.

eval "$(ssh-agent -s)"

If these steps have been properly executed, we should be having agent running with the “pid (process id)” and number.

step-06.png
                                                                           Starting the SSH-Agent. Image-source: Fixitgearware

STEP-07:

The next stage is to add your ssh keys to apple-key chain. To do so, type the command below.

ssh-add --apple-use-keychain ~/.ssh/id_ed25519_labfile01

remember “labfile01” is the name of your ssh key files, you created in “STEP-04”.

Step-07&Step-08
                  Step-07: Adding your SSH keys to apple keychain, and Step-08: Providing your paraphrase. Image-source: Fixitgearware

STEP-08:

You will be prompted to enter your paraphrase, provide the same paraphrase created during the “Step-05” stage.

STEP-09:

We are required to setup a configuration. This enables your host system (your computer), to communicate with GitHub remotely via the SSH each time we try to establish a connection, by accessing these ssh keys stored in the Keychain on your mac computer.

To setup the configuration, we must first create the configuration file. This can be achieved or created using the command below:

touch ~/.ssh/config
step-09.png
                                                                                          creating our SSH config file. image-source: Fixitgearware

STEP-10:

Next you are required to edit this configuration file, to insert some configuration commands. To edit the configuration file, we just created, type the command below.

nano ~/.ssh/config

Step-10& Step-11.png
                                Editing our config file, and pasting the code in Step 11 into the config file.Image-source: Fixitgearware

STEP-11:

In the edited configuration file, type the command below. Remember to replace the “labfile01” with the name of your ssh key file, created in “STEP-04”.

Host *  AddKeysToAgent yes  UseKeychain yes  IdentityFile ~/.ssh/id_ed25519_labfile01

 

STEP-12:

To save the command in the edited “config” file, hold “ctrl+x” keys together on your keyboard. When prompted to save changes, type “Y or Yes”, and hit enter.

Step-12.png
                     Saving the content pasted in Step-11, by hitting the “Ctrl+X” key on your keyboard as stated in Step-12. Image-source: Fixitgearware

 

STEP-13:

Now we need to get our “ssh public key” inserted in our GitHub Account on the web. But first we must get the content of this public key.

To get the content of the public key, type the command below.

nano ~/.ssh/id_ed25519_labfile01.pub

Once again, remember to replace the “labfile01” with the name of your ssh key file, from “STEP-04”.

Step-13.png
                        Editing and Copying the content of our public key file, to insert it into our GitHub Account. Image-source:Fixitgearware

STEP-14:

Copy the entire content from the edited public key file in “Step-13”,  and head over to GitHub, via your web-browser.

STEP-15:

Go to settings on GitHub on your web-browser, scroll down to “SSH and GPG keys”  and select it. On the broad interface, select “Add SSH Key”.

step-14&step-15.png
Navigating to your GitHub Account via your web-browser and locating the “SSH and GPG keys tab”, and also following the  instruction of Step-16. Image-source: Fixitgearware

STEP-16:

Paste all the content you copied from “STEP-13”, and paste it the SSH textbox field, for Title give it a name you can remember, as in the future you certainly would be adding more public keys.   After this has been done, save the entire content.

Step-16.png
                      Saving the contents of our public-key to our GitHub, while also giving it a Title name. Image-source: Fixitgearware

 

STEP-17:

To test if our connection is active and working, go to your GitHub repository, copy the specific repo link you want to clone, and then go back to your mac where the entire configuration has been carried out and run the command below.

git clone link_your_repository_you_desire_to_clone

For example:

git clone https://github.com/fixitgearware/NIST-CYBERSECURITY-FRAMEWORK-V1.1.git

Your repository should successfully clone to the directory you are located in.  To ensure you are not confused as to where the repository was cloned to, it is advisable to navigate to your desktop first or any directory you want  before running the command above.  To navigate to any directory of your choice, use the command below:

cd name_of_directory
for example: cd Desktop 

will change our directory to the desktop, you can then run the “git clone link_your_repository_you_desire_to_clone”

step-17.png
                                                Testing your configurations by cloning a repository of yours. Image-source: Fixitgearware

 

 

Put your comments below in the comment section on your thoughts about this.

Find this article and information helpful? Show some love and support  “Click-Here”
5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments