Assignment 1 - principles and practices, project management
According to Wikipedia
Git is a widely-used source code management system for software development. It is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. Git was initially designed and developed in 2005 by Linux kernel developers (including Linus Torvalds) for Linux kernel development.
As an individual we work in FABLABS we should have the common folder where we can store our projects files, the Git is the one which enables us to do so.
So, let's get started. Installation of Git will offer us the ease of access to our repositories to get the content from the repositories or taking the content out of repository.
Note: I have Ubuntu 14.04 64-bit installed. For installation process you should be connected to internet
1. GUI package manager
Step 1: Open up the package manager of your choice. In my case I'll use Ubuntu Software Manger. Goto search and 'git' and return.
Step 2: Click install and wait for the process to complete.
2 . Verbose package Manager
Step 1: Open up the Terminal which is the command line environment which is capable of doing wonders! If you are on Ubuntu just hit ctrl+alt+t. Once the Terminal pops-up enter
sudo apt-get install git -y
Appending -y
will eliminate the system prompt to inquire the confirmation of the package size which will be downloaded and size require to install the package. Wait for the process to take place.
Step 2: Now, your have the git installed on your BOX, let's try to check whether it is installed or not. To do so enter following command in the terminal and hit return
dpkg -s git
the first line of the output should says about the installation
Step 3: As we have installed the git, now it's time to setup authentication keys. The keys can be downloaded from here or from our Slack dicussion group.
Step 4: Unzip the downloaded folder named 'fab2016.zip' and then move the unzipped files to the folder '.ssh' located in the home directory, to do so,
cd ~/Downloadsunzip fab2016.zip
this will extract the keys into the parent folder named 'Downloads'
mv fab2016 ~/.sshmv fab2016.pub ~/.sshchmod 600 ~/.ssh/fab2016
Hurrey! now we have keys in place observer the change in persmissions, but still BOX doesn't know which one to use, now let's make the BOX understand which one to use, how? as follows,
eval "$(ssh-agent -s)" #this will ensure the ssh-client is workingssh-add ~/.ssh/fab2016 #this command will make BOX understand use 'fab2016' key
Step 5: Let's try to get the data from our repository. To clone the repository you can choose your favorite folder, I'll be using my home folder to clone the repository
cd ~/ #this will take terminal to your Home directorygit clone git@git.fabacademy.org:fabacademy2016/fablabvigyanashram.git
above command is to make the clone directory of your repository present at the git lab, the address is specific to the Fablab Vigyan Ashram. When you clone the repository it will create the new directory with the name same as repository's name this is my case it will be "fablabvigyanashram"
Step 6: Now we have to register on the github. github and sign up for the free account. Remember the username and email ID and most important thing your password!
Step 7: Let's configure the git, use the username and the email id that you've used in the previos step to sign up into the account.
cd ~/fablabvigyanashram # replace this with your repository foldergit config --global user.name "yourname"git config --global user.email "youremail"git config --global push.default simple
Step 1: Make all the necessary changes that you want to see.
Step 2: Now, open the Terminal and execute the following commands
cd ~/fablabvigyanashramgit pullgit add --all # add your changesgit commit -m "message" # message which will identify user & purpose of commitgit push # uploading process will start now!
chmod +x push.sh #this will add the persmissions for execution./push.sh #this will make the script RUN
Dated 7th March 2016, my system started asking password even while pulling the repository on my Box.
Solution I got to know that the key that was there namely 'fab2016' was got de-activated recently for whatever the reason and that's because I was not able to push/pull/clone to my Box.
I followed following tutorial which is targeted towards generating and adding the ssh-key, this helped me solve the problem.
https://help.github.com/articles/generating-an-ssh-key/
Please follow steps from the next page where I've mentioned the process of generating and adding the personal key into the github account.