How to Create Centralized Local “Git Repository”

Hi friends,

Lets see “How to Create Centralized Local “Git Repository

First we have to install “git-core” on both server and client. here I’m using Fedora, So I’m installing using “yum install”. Ubuntu people may use “apt-get install”

[server] $ sudo yum install git git-core

[client] $ sudo yum install git git-core


[client side]

Go to the project Directory using “cd” command.

$ cd project_directory

$ git init

$ git add .

$git commit -m “First commit”

Assume your project is in the directory ~/project. Now we have to create a clone of that project using “–bare”

$ git clone –bare ~/project project.git

Next, copy project.git to the server where you plan to host the public repository. You can use scp, rsync, or whatever is most convenient.

$ scp -r project.git servername@ipaddress:/path_to_dir

Now we copied the project into the “Server Repository”.That’s All.

Then, When you need to clone (or) pull, Create new directory and go insde of that dire., When we cloned a project from server repo., just start with that cloned project and make modifications and make commits using “$ git commit -m “message” then just use “$ git push” to push the modified project. 🙂

$ mkdir cloned

$ cd cloned

$ git clone servername@ipaddress:/path_to_dir/project


[rajee@localhost pro]$ git clone --bare sample_app/ sample_app.git
Cloning into bare repository sample_app.git...
[rajee@localhost pro]$ scp -r sample_app.git/

[rajee@localhost ~]$ cd cloned/
[rajee@localhost cloned]$ ls
fapp  testdir  testdir.git

[rajee@localhost cloned]$ git clone suresh@
Cloning into sample_app...
suresh@'s password:
remote: Counting objects: 491, done.
remote: Compressing objects: 100% (451/451), done.
remote: Total 491 (delta 210), reused 0 (delta 0)
Receiving objects: 100% (491/491), 214.64 KiB, done.
Resolving deltas: 100% (210/210), done.

[rajee@localhost cloned]$ ls
fapp  sample_app  testdir  testdir.git
[rajee@localhost cloned]$
suresh@'s password:

[rajee@localhost rails_projects]$ cd sample_app
rajee@localhost rails_projects]$ # make modifications
[rajee@localhost rails_projects]$ git push


That’s all.



Hi friends,

Today i faced a different problem on “ssh” connection. When i tried to connect a machine with mine, a new problem arrived. 😉 It’s look like the following,

[suresh@mercury ~]$ ssh rajee@
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /home/suresh/.ssh/known_hosts to get
rid of this message.
Offending key in /home/suresh/.ssh/known_hosts:5
RSA host key for has changed and you have requested
strict checking.
Host key verification failed.

The Solution is very simple. Just rename your “.ssh” into “.ssh_old” by using “mv” command.


$ mv .ssh .ssh_old

Or just go to “.ssh” directory, and  edit the file name called “known_hosts”. In this file contains, which you already connected machine’s with your’s, public ssh keys . Now just remove the public key which ip address giving trouble.


[suresh@mercury ~]$ cd .ssh
[suresh@mercury .ssh]$ ls
[suresh@mercury .ssh]$ cat known_hosts ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFZ5W
[suresh@mercury .ssh]$

That’s all.

How to Disable the “SELinux” on Fedora 14

Hi friends,

If you want disable the “SElinux” on your linux box, Just follow the simple commands. 🙂

Open your terminal and login as root user, now we have to edit the “SELinux’s”
main configuration file.

$ gedit /etc/selinux/config

you will see some lines like this:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.

Now, just change SELINUX=enforcing to SELINUX=disabled, like


and you’re done. You have to Reboot the machine to disable the SELinux.

That’s all. 



Solution for “ssh: connect to host localhost port 22: Connection refused”

Hi friends,

Since three days, i had problem with my ssh connection. When i was tried to connect my laptop to others machine,  I’m able to connect with them. But when i tried to connect, others machine to my laptop, I got this Error.

[student@mercury ~]$ ssh suresh@
ssh: connect to host port 22: Connection refused

Solution for this “port 22: Connection refused” :

First check if sshd is running by trying the command ‘$ pgrep sshd
on the host. If the output is empty, its very likely that sshd is not
running. Try ‘tail -f /var/log/messages’ on one terminal and do
a ‘$ /etc/init.d/sshd start‘ on another terminal.  Then, check the
output that comes up on the previous terminal.


if PID comes, like 1702(any number), we conform the “sshd” is running.

Next, we have to flush the “iptables” by using the following command,

$ sudo iptables -F

That’s all. Now you can connect with anyone via ssh.

If again the same problem appear, Try ‘$ grep sshd /var/log/messages | tail‘ and
$ grep ssh /var/log/secure | tail‘ and check for any possible issues.



Procedure for installing a OS inside Virtual Box

Hi friends,

In my Fedora machine i have Vm Virtual Box. me already installed ubuntu 10.10 inside of V Box. in our Office very weekend we have spl Admin class for us.

So, i installed a REDHAT 5. In side of VBox i separately installed REDHAT 3 times. Among the 3, one was server and other 2 were client.

The simple procedure for installing OS inside Virtual Box:

This slideshow requires JavaScript.


That’s All !!! 🙂

Change your TTY promt colour system in linux

Hi friends,

We can change our tty 1 to 6 promt colour system and also change the font as bold. To change follow the following simple instructions.


Login as super user and open your /etc/re.local with your favourite editor.


Add the following lines,

echo -en “\33[32m\33[8]” > /dev/tty1
echo -en “\33[34m\33[8]” > /dev/tty2
echo -en “\33[31m\33[8]” > /dev/tty3
echo -en “\33[35m\33[8]” > /dev/tty4
echo -en “\33[33m\33[8]” > /dev/tty5
echo -en “\33[1;31m\33[8]” > /dev/tty6


In last line, 1;31 means, 1 =>bold and 32 => light red colour

Simply reboot. That’s all You can see the various colous in all TTY prompts. Just press Ctrl + Alt +F1,  Ctrl + Alt +F2,  Ctrl + Alt +F3,  Ctrl + Alt +F4, Ctrl + Alt +F5,  Ctrl + Alt +F6 🙂

More info about colurs in terminal go

Enjoy it.