Using Git on 1&1 (or any ‘shared’) hosting

Here’s another “How-to” with 1and1 hosting, and this time I want to get the source code control/versioning program “Git” installed on my shared host with 1&1.  This was actually remarkably easy.

  1. Go download Git from http://git-scm.com/download.  At the time of this posting, the latest version can be found at http://kernel.org/pub/software/scm/git/git-1.6.1.tar.gz
  2. SSH into your 1&1 account
  3. “wget http://kernel.org/pub/software/scm/git/git-1.6.1.tar.gz”, and that will download the package
  4. “tar -xvzf git-1.6.1.tar.gz” which will decompress the gzip file into a subdirectory
  5. “cd git*” to change into the subdirctory
  6. “make” to begin compiling the source.  You won’t be able to do “make install” because you likely won’t have permission to install anything to the system.
  7. Now Git is ready to rock with the exception of needing to add it to your $PATH.  This can be done by typing “echo ‘PATH=$PATH:~/git-1.6.1/’ > ~/.profile”

Done!

This entry was posted in Web Development and tagged , . Bookmark the permalink.

5 Responses to Using Git on 1&1 (or any ‘shared’) hosting

  1. Mick says:

    Thanks for the tip. Probably worth mentioning that on some systems it could .bash_profile.

  2. Adam says:

    You can also use ./configure –prefix=/kunden/homepages/…/htdocs/bin/git, then make && make install.

  3. Pingback: Using Git on 1&1 (or any 'shared') hosting - Derek Gathright « Hotwebhostreviews.com

  4. Matthias says:

    Does this allow for http(s) remote access?

  5. Woody says:

    Hi Derek,

    I happened across this post of yours RE getting GIT to work on 1and1 as I was trying to make it work for me, using another helpful tutorial I managed to get it to work another way (as 1and1 now have it already installed.)

    I wrote a guide for people to get a GIT repository up and working on 1and1 here:
    http://blog.woodylabs.com/2012/01/1and1-web-hosting-git-installing-it-for-singular-dev/

    …this way has the added benefit of keeping a “live” web root updated which means no more manual file uploading :D

    Cheers

    Woody

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">