A brief explanation about how to install and setup a git repository will be described here.
In order to remotely access your git repositories you must setup a SSH account with bluehost, so log in to your Bluehost account and look for the option SSH. You must send an copy of your ID and wait for them to setup an account for you
(I used my webcam to take a picture of my ID and that was more than enough).
1) Create a place to install the git binary files.
In my case, I’ve created a local folder “.local” inside my $HOME folder (~/.local).
#cd ~ #mkdir .local
2) Edit your .bashrc file and add the following line. Logout and login again to apply changes.
3) Create a folder “~/.local/src”, download the latest version of git (in my case 184.108.40.206) and compile it
#cd ~/.local #mkdir -v src #cd src #wget http://kernel.org/pub/software/scm/git/git-220.127.116.11.tar.gz #tar -xzf git-18.104.22.168.tar.gz #cd git-22.214.171.124 #./configure --prefix=$HOME/.local LDFLAGS="-L/lib64" #make #make install
1) Create a “~/git/repository” folder that will contain your files
#cd ~ #mkdir git #cd git #mkdir repository
2) Create a bare repository using git init
A bare repository works like a SVN server repository. This means that a bare repository only keeps track of
changes from someplace else and you actually don’t work inside it.
#cd ~/git/repository #git init --bare --share
3) Create a working copy folder by cloning your empty repository, add files to the cloned folder, commit and push the changes back to your bare repository.
In order to use the bare repository, a master banch needs to be created. This is accomplished by using “git add .”.
This command tells git to add all files and folders to the repository (in this case I’m creating a test file,
here you could copy your files to this folder before executing this command).
#cd ~/git #git clone ~/git/repository myfolder #cd myfolder #echo This is a test file > text.txt #git add .
Note that, distinct from SVN, you must commit then push the changes back to the bare repository. In git, the command commit
saves the changes to your cloned local repository; the command push will actually send the changes to your main bare repository.
#git push ~/git/repository/ master
At this point you have a fully functional bare repository.
To test it, lets delete “~/git/myfolder” and create another clone.
#cd ~/git/ #rm -rf myfolder #git clone ~/git/repository/ myfolder2 #cd myfolder2 #cat test.txt
You should be able to see the contents of test.txt
Please note that I’m not covering how to install git in your local machine, but that should not be an issue since
the process above cover any linux install. For windows users, there are plenty of how-tos in the web. The binaries
can also be found in http://git-scm.com
The steps below describe how to access a remote git repository through SSH installed in BlueHost
1) In your local machine, create a folder and use “git init” to start a fresh repository.
This folder will contain a working copy of your repository.
mkdir mylocalfolder cd mylocalfolder git init
2) Create an alias “myrepository” to identify the remote repository to git. Note that email@example.com
must be changed by your actual domain hosted on Bluehost. Please also check the path to your home folder
(you can use “echo $HOME” in the server to check it)
git remote add myrepository firstname.lastname@example.org:/home/myuser/git/repository/
3) Map the git commands “git-upload-pack” and “git-receive-pack”.
This is the trick that makes git work remotely with Bluehost. Remember checking and replacing “/home/myuser” folder
for your actual home folder (you can use “echo $HOME” in the server to check it)
git config add remote.myrepository.uploadpack /home/myuser/.local/bin/git-upload-pack git config add remote.myrepository.receivepack /home/myuser/.local/bin/git-receive-pack
Alternatively, you also can change thoose properties by editing the file “mylocalfolder/.git/config”
The file should contain a session like this
[remote "myrepository"] url = email@example.com:/home/myuser/git/repository/ fetch = +refs/heads/*:refs/remotes/repository/* receivepack = /home/myuser/.local/bin/git-receive-pack uploadpack = /home/myuser/.local/bin/git-upload-pack
4) Finally, pull your files from your bare repository (branch master in this case) to your work folder
git pull myrepository master
Your working copy is ready to go. Just remember, after any change use
git add . git commit git push myrepository master
A good GIT by example guide can be found at
Please let me know of any typos.
I hope you all find this tutorial useful!
That is quite easy as usual
1) Install Java JDK
sudo add-apt-repository ppa:sun-java-community-team/sun-java6 sudo apt-get update sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
2) Download Eclipse Helios
Select the package that fits best your purpose from
3) Uncompress the eclipse inside your home folder “/home/[user]/” by simply double clicking the eclipse-[…]-tar.gz then dragging and dropping the “eclipse” folder into your home folder
4) Create a launcher in the desktop
– Right click the desktop area and select “Create Launcher…”
– In the field “Name” add “Eclipse:
– In the field “Command” add “/home/[user]/eclipse/eclipse”
– Change the icon by clicking the left-top icon button then selecting the file “/home/[user]/eclipse/icon.xpm”
5) Double click the eclipse icon in your desktop and select your new workspace
You should be good to go!
1. Request SSH access from Bluehost
You’ll need SSH Access, so make sure you request that through the “SSH/Shell Access” option on your CPanel.
2. Download and install Putty (SSH client)
You’ll also need a SSH client, so download the latest version of PuTTY.
3. Install Subversion in the server.
Access SSH terminal and execute the following commands:
(Update the version as needed)
# mkdir ~/src && cd ~/src # wget http://subversion.tigris.org/downloads/subversion-deps-1.6.16.tar.gz # wget http://subversion.tigris.org/downloads/subversion-1.6.16.tar.gz # tar -xzvf subversion-deps-1.6.16.tar.gz # tar -xzvf subversion-1.6.16.tar.gz # cd subversion-1.6.16# ./configure --prefix=$HOME --without-berkeley-db --witth-ssl LDFLAGS="-L/lib64" # make && make install
4. Create your repository and verify it
# cd ~ && svnadmin create [your_repository] # svn list svn+ssh://[user]@[hostname]/home/[user]/[your_repository]
5. Create an authentication Key Par
Type the following commands (You can leave the passphrase empty if you wish)
# ssh-keygen rsa -t
Copy the key to the authorized_key files
# cp .ssh/id_rsa.pub .ssh/authorized_keys
Edit authorization_keys and add the following command in front of your key
The authorization_key file should look like
command="/home/USERNAME/system/bin/svnserve -t" ssh-rsa AABBcddeEEDDD...[COMPLETE KEY REMOVED]
* Alternative commands
# ssh-keygen -f ~/.ssh/id_rsa_svn -N '' -q # echo 'command="~/bin/svnserve -t" ' | cat - ~/.ssh/id_rsa_svn.pub >> ~/.ssh/authorized_keys
6. Importing private key to local computer with PuTTyGen
By using a ftp client or cPanel File Manager, copy the private key “id_rsa” to a folder of your choice. Open PuttyGen then select the Conversions menu and select Import Key. Find the id_rsa file you just downloaded and import it. After it is imported select the “Save Private Key”button and export the .PPK file to your choosing.
7. Saving a Putty session
Open Putty, fill in “Host Name” with the whole domain, go to SSH and then to AUTH and then select the private key you exported above. You can also insert your default user (auto-login) in the option Connection – Data. Go back to the sessions option, name your “Saved Session” as “Subversion” and push the Save button. Test your Putty session clicking on Open. If everything is right, you should be logged in without typing your password.
8. Install and configure Tortoise
After installing Tortoise, edit your subversion config file located at
C:\Documents and Settings\YOUR_LOCAL_USERNAME\Application Data\Subversion\config
Vista or Win7:
Find the section [tunnels] and add the following:
ssh = c:\\Program\ Files\\TortoiseSVN\\bin\\TortoisePlink.exe
*Optional: You can also change the subversion config from inside BlueHost.
Edit your subversion config file located at
Again, inside the section [tunnels] add the following:
ssh = ssh -i ~/.ssh/id_rsa_svn user@hostname ~/bin/svnserve -t #
ssh = ssh -q -i ~/.ssh/id_rsa_svn user@hostname ~/bin/svnserve -t #
9. Configure and run Pageant
Open Pageant, you should see an icon in taskbar. Right-click the icon, select “Add Key.” and add your private key file previously imported and generated (.ppk). If you Open up PuTTY again and reconnect using your “Subversion” session. You’ll be asked for your username, but you should no longer have to enter a passphrase.
10. Connect to the repository using Tortoise
Open up Pageant and add your private key again. Right-click in some folder, select “TortoiseSVN > RepoBrowser”. A dialog box will come up. Type in “svn+ssh://[user]@[domain]/home/[user]/[your_repository] and execute the operation.
That’s it, your repository should be accessible through SSH