Skip to content

1. Project Management

So, I am finally on my first week of Fabacademy, and this is how I kick started!

I was a little bit terrified being my first time. First, I had to watch the recorded global Lecture on Vimeo since I missed it. It was conducted on the same day I was flying from Malawi to EnergyLab Lome.

In this week we learned the importance of time, project management and the importance of having a comprehensive documentation.

INDIVIDUAL ASSIGNMENT:

  • Read, sign the student/instructor/lab agreements, and commit your repos

  • Work through a git tutorial

  • Build a personal site in the class archive describing you and your final project.

As per assignment requirement, for this week, we have been tasked to do the following:

1. Work through a git tutorial

2. Set up SSH key.

3. Build your own website and document the process of your work.

4. Introduce yourself on the About Me web page.

5. Sketch a plan for your final project.

This week I worked on defining my final project idea and started to getting used to the documentation process.

git is a version control system.

It helps you to keep track of code changes.

STEP 1.

I went through a git tutorial trying to learn and understand git and Gitlab the installation and its configuration.

Here is a link for git tutorial

To install and config Git

You can download Git for free from the following website

I downloaded Git and installed as follows:

Installing Git

To configure Git:

Here is a link to configure Git default credentials

I open the start menu on my PC, and click on all apps.

You can see git folder and try to open the folder.

When you expand on git option you will see git bash, git cmd etc.

Click to open git bash.

This is what you see after opening git bash

  • The first thing you need to do when you want to -configure Git is to set your username and email address.

  • This is important because every Git commit uses this information, and it is immutably embedded in the commits you start creating:

$ git config –global user.name “jonathan-phiri”

$ git config –global user.email “jonathangamuti@outlook.com”

You can further check by opening a terminal and type cd c: or git config user.name and press enter

You will observe your user name appears.

Type git config user.email and press enter. Your email appears.

Step 2.

Setting up SSH Key pair

  • SSH key provide the secure connection between your PC and your GitLab repository accounts.

  • The SSH key allows you to clone your local repository to your remote repository.

If you do not have an ssh key pair, then generate one.

Here is a link to generate an ssh key

To do this, I opened my C drive/users/user and Create a new folder (ssh key folder).

On mydesktop I opened git bash.

Type ssh-keygen and press enter.

You can specify file directory if you have a reason to. But in my case I just pressed enter.

Just press enter for passphrase

There you have generated your SSH key

Then you can go to the directory and check in the ssh folder.

Open the folder and you will see 2 keys, one private and other one public.

After generating my SSH Key:

I navigated to the directory it was saved.

I opened the public key with note pad and I copied the key.

Then I went to my repository and opened preference

Under user settings I selected SSH keys

and I pasted the key under Add an SSH key box

now I scrolled further down to click on Add Key

There I have added my SSH Key

Step 3.

I need to clone my Gitlab repository on my computer

To do so, I clicked on the code blue button on the right.

I selected clone with SSH.

After copying the URL I opened terminal and run the following cammand:

git clone git@gitlab.fabcloud .org:your/project/path.git

press enter and that is it.

Now you can see Jonathan folder is appearing in my PC just after cloning process.

Step 4.

Installing MKDocs:

Before Installing MKDocs, I downloaded and Installed VS code.

Here is the link for VScode

Here a link on how to install

Since Markdow is a python package, I also dowloaded and installed python as follows:

I downloaded python from this link

To Install MKDocs I opened my local repository folder with git bash here.

Then I run the following command:

pip install mkdocs

Then Press enter.

Then I run another command

mkdoc serve

Step 5

Add and commit changes:

I used add and commit functions to add and commit changes I make on my files.

  • git add . takes the modified in your working directory and places the modified version in staging area.

  • git commit -m”comment” takes everything from the staging area and makes a permanent snapshort of the current state of your repository that is associated with a unique identifier.

Push changes to GitLab:

So I push changes to Gitlab using command

git push

Files:

Git

Git conifiguration

MKDocs

Markdown

What went well /what went wrong.

What went well

For this week’s assignment the overall processes went well though not smoothly. Most of the terms I used were very new like gitlab, git bash, git commit, Mkdocs and was very interesting to discover their wonders.

What went wrong

when I was trying to command mkdocs serve on git bash at my local site I encountered two configuration errors, and the process was aborted.

  • Error- config value ‘theme’; Unrecognised theme name:

  • Error- config value ‘plugins’; The git-revision-date-localised: plugin is not installed.

The first error was due to the fact that I forgot to download material theme proposed on the template of fabacademy.

The solution for the first error was to download the material theme. To do that I run a command;

$ pip install mkdocs-material

And press enter

The second error was due to the missing plugins. The plugins allows it to see the last update of each page of the site.

So to solve this Iran another command

$ pip install mkdocs-git-revision-date-localized- plugin

And press enter


Last update: July 12, 2024