<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joe Maller &#187; ssh</title>
	<atom:link href="http://joemaller.com/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://joemaller.com</link>
	<description>.com</description>
	<lastBuildDate>Tue, 15 May 2012 03:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to install Git on a shared host</title>
		<link>http://joemaller.com/908/how-to-install-git-on-a-shared-host/</link>
		<comments>http://joemaller.com/908/how-to-install-git-on-a-shared-host/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 01:45:00 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[shared host]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=908</guid>
		<description><![CDATA[(regularly updated) Installing Git on a shared hosting account is simple, the installation is fast and like most things Git, it just works. This is a basic install without documentation. My main goal is to be able to push changes from remote repositories into the hosted repository, which also serves as the source directory of [...]]]></description>
			<content:encoded><![CDATA[<p><em>(regularly updated)</em></p>
<p>Installing <a href="http://git-scm.com">Git</a> on a shared hosting account is simple, the installation is fast and like most things Git, it just works.</p>
<p>This is a basic install without documentation. My main goal is to be able to push changes from remote repositories into the hosted repository, which also serves as the source directory of the live website. <a href="http://joemaller.com/990/a-web-focused-git-workflow/">Like this</a>.</p>
<h3>Prerequisites</h3>
<p>The only two things you absolutely must have are shell access to the account and permission to use GCC on the server. Check both with the following command:</p>
<pre><code>$ ssh joe@webserver 'gcc --version'
<span class="output">gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
[...]</span></code></pre>
<p>If GCC replies with a version number, you should be able to install Git. SSH into your server and let&#8217;s get started!</p>
<p>If you see something like <em>/usr/bin/gcc: Permission denied</em> you don&#8217;t have access to the GCC compiler and <strong>will not</strong> be able to build the Git binaries from source. <a href="#hosting">Find another hosting company</a>.</p>
<h3>Update your $PATH</h3>
<p>None of this will work if you don&#8217;t update the $PATH environment variable. In most cases, this is set in <strong>.bashrc</strong>. Using <strong>.bashrc</strong> instead of <strong>.bash_profile</strong> updates $PATH for interactive and non-interactive sessions&#8211;which is necessary for remote Git commands. Edit <strong>.bashrc</strong> and add the following line:</p>
<pre><code>export PATH=$HOME/bin:$PATH</code></pre>
<p>Be sure &#8216;~/bin&#8217; is at the beginning since $PATH is searched from left to right; to execute local binaries first, their location has to appear first. Depending on your server&#8217;s configuration there could be a lot of other stuff in there, including duplicates.</p>
<p>Double-check this by sourcing the file and echoing $PATH:</p>
<pre><code>$ source ~/.bashrc
$ echo $PATH
<span class="output">/home/joe/bin:/usr/local/bin:/bin:/usr/bin</span></code></pre>
<p>Verify that the remote path was updated by sending a remote command like this (from another connection):</p>
<pre><code>$ ssh joe@webserver 'echo $PATH'
<span class="output">/home/joe/bin:/usr/local/bin:/bin:/usr/bin</span></code></pre>
<p>Note: Previous iterations of this page installed into the ~/opt directory. Following current Git conventions, I&#8217;m now installing into the default <code>~/bin</code>.</p>
<h3>Installing Git</h3>
<p>SSH into your webserver. I created a source directory to hold the files and make cleanup easier:</p>
<pre><code>$ cd
$ mkdir src
$ cd src</code></pre>
<p>Grab the most recent source tarball from <a href="https://github.com/git/git/tags/">Github</a>. When this post was updated, the current Git release was version 1.7.10.1:</p>
<pre><code>$ curl -LO https://github.com/git/git/tarball/v1.7.10.1</code></pre>
<p>Untar the archive and cd into the new directory:</p>
<pre><code>$ tar -xzvf v1.7.10.1
$ cd git-git-9dfad1a</code></pre>
<p>By default, Git installs into <code>~/bin</code> which is perfect for shared hosting. Earlier versions required adding a prefix to the configure script (<a href="http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/">like this</a>), but none of that is necessary anymore. If you do need to change the install location of Git, just specify a prefix to the Make command as described in Git&#8217;s INSTALL file.</p>
<p>With all that taken care of, installation is simple:</p>
<pre><code>$ make
$ make install
<span class="response">[lots of words...]</span></code></pre>
<p></code></pre>
<p>That should be it, check your installed version like this:</p>
<pre><code>$ git --version
<span class="response">git version 1.7.10.1</span></code></pre>
<p>It's now safe to delete the src folder containing the downloaded tarball and source files.</p>
<p><a name="hosting"></a>My preferred shared hosting providers are <a href="http://www.a2hosting.com/1482.html">A2 Hosting</a> and <a href="http://www.webfaction.com/signup?affiliate=joemaller">WebFaction</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/908/how-to-install-git-on-a-shared-host/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>SSH Key Pair troubleshooting</title>
		<link>http://joemaller.com/812/ssh-key-pair-troubleshooting/</link>
		<comments>http://joemaller.com/812/ssh-key-pair-troubleshooting/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 03:40:11 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://joemaller.com/2007/09/05/ssh-key-pair-troubleshooting/</guid>
		<description><![CDATA[For some reason I&#8217;ve put off setting up SSH key pairs, probably having something to do with how arcane most of the setup instructions appear. Tonight however, I&#8217;m unexpectedly preparing to transfer a client to a new hosting account on Media Temple and enjoying key-pair access to their new repository. Media Temple doesn&#8217;t yet support [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason I&#8217;ve put off setting up SSH key pairs, probably having something to do with how arcane most of the setup instructions appear. Tonight however, I&#8217;m unexpectedly preparing to transfer a client to a new hosting account on Media Temple and enjoying key-pair access to their new repository.</p>
<p>Media Temple doesn&#8217;t yet support <code>svn://</code> access to Subversion repositories, only <code>svn+ssh://</code>. So, having been pushed, I finally decided to make my life easier with SSH key pairs.</p>
<p>The best tutorial I found was Allan Odgaard&#8217;s: <a href='http://macromates.com/blog/2005/subversion-support-and-ssh-key-pairs/'>Subversion support and ssh key pairs</a>. Without ssh key pairs, all the fantastic Subversion integration in TextMate won&#8217;t work with svn+ssh:// repositories.</p>
<p>However there&#8217;s one crucial piece of information missing from that: <em>Permissions</em>.</p>
<p>If access to the SSH configuration files is not properly assigned, the ssh pair won&#8217;t work. No meaningful errors at connect time, just silent, infuriating failure.</p>
<p>The ~/.ssh directory permissions need to be set to <strong>0700</strong> and the authorized_keys file needs to be set to <strong>0600</strong>:</p>
<p><code>chmod 0600 ~/.ssh/authorized_keys<br />
chmod 0700 ~/.ssh</code></p>
<p>If group or world have write access to authorized_keys, key pair authentication will fail.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/812/ssh-key-pair-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 3/8 queries in 0.003 seconds using disk: basic
Object Caching 269/275 objects using disk: basic

Served from: joemaller.com @ 2012-05-24 02:55:53 -->
