Week-1 :- Principle and Practice, Project Management

The first video conference class was conducted by Prof.Neil Gershenfel (professor at MIT and the director of MIT's Center for Bits and Atoms). During the session he gave a brief description about Digital fabrication, its principle and practices.

The first week assigment was to create a Webpage. I have little idea about HTML, but my interest in linux operating system and the instructions from lab instructor helped me creating this HTML page. We installed GIT and ATOM softwares for building this webpage.
Git was started by Linus Torvalds, and is currently maintained by Junio. C Hamano. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git tracks the changes done on computer files and are generally mentioned by a number or revision number. Each revision number is assosiated with a time stamp and the person making the change.

Webpage Development

Installing Git

A Git project normally consists of a working directory with a ".git" subdirectory. The .git directory contains, among other things, a compressed object database representing the complete history of the project, an "index" file which links that history to the current contents of the working tree..

At first, we installed the Git software on linux (Manjaro), then created an account in git.fabacademy.org. Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username or password at each visit. Using the fingerprint, we created the public key using the following command.

SSH Key

SSH keys identifying yourself to an SSH server using public-key cryptography and challenge-response authentication.

SSH key comprises of two separate keys -
1. A public key - which you can share freely with any SSH server.
2. A private key - which should be known only to you, and kept secret.

The following are some of the advantages of using SSH keys over traditional password authentication.
1. Your password is never sent over the network.
2. Eliminates the risk posed by brute-force password attacks.
3. More convenience - You can connect to a server, or multiple servers, without having to remember or enter your password for each system.

To generate an SSH key pair in Linux, ssh-kengen command is used. -t option specifies the type of encryption to use while creating the key pair. The possible values are the following.
DSA - 1024 bit algorithm
RSA - 2048-4096 bit algorithm
ECDSA - stands for Elliptic Curve Digital Signature Algorithm that provides smaller key sizes and faster operations when compared to other algorithms.
The program will ask you to (optionally) enter a password phrase. You can just press the ENTER key if you do not want to set the password phrase. This tool will generate two keys - id_rsa and id_rsa.pub which will be saved in our home directory.

ssh-kengen-t rsa -b 4096 -C "email"

The public key can be extracted using the command
.ssh cat id_rsa.pub

The extracted public key is to be copied and added with the git web page in setting option.After adding the key, the next step is to configure and add the user.name and user.email. The following commands are shown below.
git config --global user.name "user.name"
git config --global user.email "useremail"


Clone the repository


Clone the repository and check the key permission using the following commands.
git clone "SSH link"
ls -l .ssh

SSH Agent

Now add key to the system with the following commands
SSH Agent command is used to remember your password phrase. An SSH Agent is a program used to hold private keys used for public key authentication.
eval "$(ssh-agent -s)"
ssh-add .ssh/id_rsa

Check the identity using the following command.
ssh-add -l

Installed a text editor software "Atom". Atom is a text editor that's modern, approachable, yet hackable to the core—a tool you can customize to do anything but also use productively without ever touching a config file. Sudo allows users to run programs with the security privileges. This package is installed using the super user command >sudo pacman -S atom.

This command updates the index using the current content found in the working tree directory, to prepare the content staged for the next commit. It typically adds the current content of existing paths as a whole,or remove paths that do not exist in the working tree.
The "index" holds a snapshot of the content of the working tree directory. Thus after making any changes to the working tree, and before running the commit command, you must use the add command to add any new or modified files to the index. This command can be performed multiple times before a commit. It only adds the content of the specified file(s) at the time the add command is run; if you want subsequent changes included in the next commit, then you must run git add again to add the new content to the index. The git status command can be used to obtain a summary of which files have changes that are staged for the next commit. The git add command will not add ignored files by default. The git add command can be used to add ignored files with the -f (force) option.

  sudo pacman -S atom
  git add index.html
  git status
  git commit -m "Test file Comments"
  git push

After making the necessary file updations, all changes are upload to repository using the following sequence of commands.
git pull
git add .
git commit -m "Test file Comments"
git push