Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>With a little work, I was able to get Git running on my GoDaddy account. There's a longer posting detailing the process on <a href="http://johntrammell.com/wp/2011/01/05/using-git-on-godaddy/" rel="nofollow noreferrer">my blog</a>, but the short answer is:</p> <ol> <li>install git in your account (perhaps using the tarball referenced in my blog post)</li> <li>create a git repository (bare or not) in your account</li> <li><p>check out your repository, using -u to indicate the path to <code>git-upload-pack</code></p> <p>% git clone -u libexec/git-core/git-upload-pack mysite:myrepo.git</p></li> <li><p>tweak your local repository config to point to the correct paths to <code>git-upload-pack</code> and <code>git-receive-pack</code>:</p> <p>% git config remote.origin.receivepack libexec/git-core/git-receive-pack<br> % git config remote.origin.uploadpack libexec/git-core/git-upload-pack</p></li> </ol> <hr> <p>Since the blog is no longer accessible, here is the full post pulled from <a href="http://web.archive.org/web/20110830112931/http://johntrammell.com/wp/2011/01/05/using-git-on-godaddy/" rel="nofollow noreferrer">archive.org</a>:</p> <h2>Using Git on GoDaddy</h2> <p>This blog is hosted on a cheap GoDaddy account. When shell access over SSH was recently made available, I thought it would be fun to install local git repositories. It wasn’t trivial, but I did finally get it working. Here’s how I did it:</p> <h3>Step 0. Configure SSH</h3> <p>You want to create a public key so you can SSH in to your GoDaddy account painlessly. Create a key pair if you don’t already have one, and add it to <code>~/.ssh/authorized_keys</code>. I’ll assume an entry in <code>~/.ssh/config</code> something like this:</p> <pre><code>Host mysite HostName mygodaddysite.com User mylogin </code></pre> <h3>Step 1. Install Git</h3> <p>After poking around on my GoDaddy host, I discovered it was running CentOS 5.2. Binaries running on my laptop weren’t compatible, so I used VirtualBox to set up a local Centos 5.2 install and build Git. I’m sharing a tarball containing the <a href="http://johntrammell.com/centos5.2-git.tar.gz" rel="nofollow noreferrer">pre-built CentOS 5.2 Git binaries</a>. You should be able to download and install with the commands:</p> <pre class="lang-bash prettyprint-override"><code>wget http://johntrammell.com/centos5.2-git.tar.gz tar xzf centos5.2-git.tar.gz </code></pre> <p>Enjoy this part–I’ve saved you a couple hours’ work here.</p> <h3>Step 2. Set up your environment.</h3> <p>Add the following to your .bash_profile:</p> <pre><code>export EDITOR=vim export PATH=$PATH:$HOME/bin:$HOME/libexec/git-core export LD_LIBRARY_PATH=$HOME/lib export GIT_EXEC_PATH=~/libexec/git-core export GIT_TEMPLATE_DIR=~/share/git-core/templates </code></pre> <p>This will set your environment up correctly on an interactive shell. Unfortunately I can’t seem to get the PATH to set correctly for non-interactive SSH commands. For example, when I run this command from my laptop:</p> <pre class="lang-bash prettyprint-override"><code>ssh mysite env </code></pre> <p>I see the default PATH. This is also the case when I set the path in .bashrc. I haven’t tracked down exactly what SSH does on non-interactive access, but this may be related to the PermitUserEnvironment setting in sshd. Luckily we can work around this.</p> <h3>Step 3. Creating a repository</h3> <p>Log in to your GoDaddy account, and create a simple “bare” Git repository:</p> <pre class="lang-bash prettyprint-override"><code>% mkdir myrepo % cd myrepo % touch README % git init % git add README % git commit -m 'empty git repository' % cd .. % git clone --bare myrepo myrepo.git </code></pre> <p>You now have a bare repository in <code>~/myrepo.git/</code> in the root of your GoDaddy account.</p> <h3>Step 4. Checking out your repository</h3> <p>The only tricky part to this is that you have to tell git where to find git-upload-pack. This works around the PATH problem mentioned above. On your local machine, do this:</p> <pre class="lang-bash prettyprint-override"><code>git clone -u libexec/git-core/git-upload-pack mysite:myrepo.git </code></pre> <p>You should now have a copy of the original minimal repository checked out.</p> <h3>Step 5. More git configuration tweaks</h3> <p>Sadly we are not done:</p> <pre class="lang-bash prettyprint-override"><code>% cd myrepo % echo "foo" &gt; README % git commit -am 'updated' [master 044c086] updated 1 files changed, 1 insertions(+), 0 deletions(-) % git push bash: git-receive-pack: command not found fatal: The remote end hung up unexpectedly </code></pre> <p>Our PATH problems are interfering with the push operation now. As a workaround, we can either specify –receive-pack on the command line, or set it in the local configuration (the same applies for fetch operations and –upload-pack):</p> <pre class="lang-bash prettyprint-override"><code>% git config remote.origin.receivepack libexec/git-core/git-receive-pack % git config remote.origin.uploadpack libexec/git-core/git-upload-pack </code></pre> <p>Congratulations, you should be up and running now!</p> <h3>Resources</h3> <ul> <li><a href="http://johntrammell.com/centos5.2-git.tar.gz" rel="nofollow noreferrer">http://johntrammell.com/centos5.2-git.tar.gz</a></li> <li><a href="https://serverfault.com/questions/26836/setting-up-a-git-repo-on-my-godaddy-hosting-plan">https://serverfault.com/questions/26836/setting-up-a-git-repo-on-my-godaddy-hosting-plan</a></li> <li><a href="https://stackoverflow.com/questions/1003885/setting-up-a-git-repo-on-my-godaddy-hosting-plan">Setting up a git repo on my GoDaddy hosting plan</a></li> <li><a href="https://stackoverflow.com/questions/225291/git-upload-pack-command-not-found-how-to-fix-this-correctly">git-upload-pack: command not found, how to fix this correctly</a></li> <li><a href="http://www.bluehostforum.com/showthread.php?20304-Bluehost-Solution-to-the-Git-PATH-issue-when-using-a-non-interactive-shell" rel="nofollow noreferrer">http://www.bluehostforum.com/showthread.php?20304-Bluehost-Solution-to-the-Git-PATH-issue-when-using-a-non-interactive-shell</a></li> <li><a href="http://www.google.com/search?q=ssh+setup" rel="nofollow noreferrer">http://www.google.com/search?q=ssh+setup</a></li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-upload-pack.html" rel="nofollow noreferrer">http://www.kernel.org/pub/software/scm/git/docs/git-upload-pack.html</a></li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-receive-pack.html" rel="nofollow noreferrer">http://www.kernel.org/pub/software/scm/git/docs/git-receive-pack.html</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload