<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: git on shared hosting with git-http-backend</title>
	<atom:link href="http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/</link>
	<description>blog about being mobile, but including technology</description>
	<pubDate>Mon, 21 May 2012 06:05:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: santos</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-34596</link>
		<dc:creator>santos</dc:creator>
		<pubDate>Thu, 14 Jul 2011 11:54:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-34596</guid>
		<description>Hello,

I didn't understand why the RewriteRule uses this path: /git/git-http-backend.sh/$1

Will git-http-backend.sh be executed? 
I known the directive RewriteMap scripts execution.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I didn&#8217;t understand why the RewriteRule uses this path: /git/git-http-backend.sh/$1</p>
<p>Will git-http-backend.sh be executed?<br />
I known the directive RewriteMap scripts execution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: valhallasw</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-16030</link>
		<dc:creator>valhallasw</dc:creator>
		<pubDate>Tue, 12 Oct 2010 22:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-16030</guid>
		<description>Hi Tom,

After a lot of work, I found the cause for the code-22 error. If git-http-backend does not consider you authenticated, git push will fall back to webdav, which causes all kinds of trouble. The solution, in my case, was defining REMOTE_USER from REDIRECT_REMOTE_USER.

For my setup, please see http://blog.procrastination.nl/2010/10/git-http-backend-on-shared-hosting-with.html</description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>After a lot of work, I found the cause for the code-22 error. If git-http-backend does not consider you authenticated, git push will fall back to webdav, which causes all kinds of trouble. The solution, in my case, was defining REMOTE_USER from REDIRECT_REMOTE_USER.</p>
<p>For my setup, please see <a href="http://blog.procrastination.nl/2010/10/git-http-backend-on-shared-hosting-with.html" rel="nofollow">http://blog.procrastination.nl/2010/10/git-http-backend-on-shared-hosting-with.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ianc</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-15438</link>
		<dc:creator>ianc</dc:creator>
		<pubDate>Fri, 17 Sep 2010 17:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-15438</guid>
		<description>This has been a very helpful tutorial.  I'm having the same issues as tom, although my git-daemon-export-ok files is there.  I'm a bit confused about website.com and the location of git projects.

My public_html doesn't have a website.com folder, so I thought I'd try to put it directly in public_html/git.  I've tried both (public_html/website.com/git and public_html/git) and experience problems with both.  

I found the regular expression used in RewriteRule won't match git projects with hyphens in their name.  Changing it to

[CODE]
RewriteRule ^([a-zA-Z0-9._-]*\.git/(HEAD&#124;info/refs&#124;objects/(info/[^/]+&#124;[0-9a-f]{2}/[0-9a-f]{38}&#124;pack/pack-[0-9a-f]{40}\.(pack&#124;idx))&#124;git-(upload&#124;receive)-pack))$ /git/git-http-backend.sh/$1[/CODE]

This stopped the "not found: did you run git update-server-info" problems, but now I'm getting "error:  The requested URL returned error:  500 while accessing http://somedomain.com/git/project.git/info/refs while cloning.

Thoughts?  And perhaps an explanation of whether website.com is necessary?  I'm assuming it simply fits convention, perhaps when multiple domains are hosted by the same account.

Also, I noticed tom said he put git-daemon-export-ok in /website.com/git/myproject.git.  It should go in $HOME/gitprojects/myproject.git, right?  The git project doesn't need to be copied into public_html?</description>
		<content:encoded><![CDATA[<p>This has been a very helpful tutorial.  I&#8217;m having the same issues as tom, although my git-daemon-export-ok files is there.  I&#8217;m a bit confused about website.com and the location of git projects.</p>
<p>My public_html doesn&#8217;t have a website.com folder, so I thought I&#8217;d try to put it directly in public_html/git.  I&#8217;ve tried both (public_html/website.com/git and public_html/git) and experience problems with both.  </p>
<p>I found the regular expression used in RewriteRule won&#8217;t match git projects with hyphens in their name.  Changing it to</p>
<p>[CODE]<br />
RewriteRule ^([a-zA-Z0-9._-]*\.git/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))$ /git/git-http-backend.sh/$1[/CODE]</p>
<p>This stopped the &#8220;not found: did you run git update-server-info&#8221; problems, but now I&#8217;m getting &#8220;error:  The requested URL returned error:  500 while accessing <a href="http://somedomain.com/git/project.git/info/refs" rel="nofollow">http://somedomain.com/git/project.git/info/refs</a> while cloning.</p>
<p>Thoughts?  And perhaps an explanation of whether website.com is necessary?  I&#8217;m assuming it simply fits convention, perhaps when multiple domains are hosted by the same account.</p>
<p>Also, I noticed tom said he put git-daemon-export-ok in /website.com/git/myproject.git.  It should go in $HOME/gitprojects/myproject.git, right?  The git project doesn&#8217;t need to be copied into public_html?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mobiphil</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-11347</link>
		<dc:creator>mobiphil</dc:creator>
		<pubDate>Thu, 17 Jun 2010 21:56:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-11347</guid>
		<description>Tom:

I added some time later a new git repo... I had the same error. The I remembered that I have to add the git-daemon-export-ok file. The I came here to update the instruction and to tell you what you should take care.. but I see that this solved your problem already.</description>
		<content:encoded><![CDATA[<p>Tom:</p>
<p>I added some time later a new git repo&#8230; I had the same error. The I remembered that I have to add the git-daemon-export-ok file. The I came here to update the instruction and to tell you what you should take care.. but I see that this solved your problem already.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trac and git-http-backend &#171; XRunHProf</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-11018</link>
		<dc:creator>Trac and git-http-backend &#171; XRunHProf</dc:creator>
		<pubDate>Tue, 01 Jun 2010 12:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-11018</guid>
		<description>[...] http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend (for the idea of the cgi... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend" rel="nofollow">http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend</a> (for the idea of the cgi&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Elam</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-10824</link>
		<dc:creator>Tom Elam</dc:creator>
		<pubDate>Thu, 20 May 2010 17:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-10824</guid>
		<description>mobiphil,

Got clone to work. Should have paid more attention to the git-http-backend man page. I added the file git-daemon-export-ok to /website.com/git/myproject.git and all went well.

Now I'm working on getting push to work. I'm cd'ing into the cloned repository, making and committing a change, and running the command:
  git push http://tomelam:password@onthesamepage.org/website.com/git/myproject.git

and getting return code 22, 'fatal: git-http-push failed'.

Tom</description>
		<content:encoded><![CDATA[<p>mobiphil,</p>
<p>Got clone to work. Should have paid more attention to the git-http-backend man page. I added the file git-daemon-export-ok to /website.com/git/myproject.git and all went well.</p>
<p>Now I&#8217;m working on getting push to work. I&#8217;m cd&#8217;ing into the cloned repository, making and committing a change, and running the command:<br />
  git push <a href="http://tomelam:password@onthesamepage.org/website.com/git/myproject.git" rel="nofollow">http://tomelam:password@onthesamepage.org/website.com/git/myproject.git</a></p>
<p>and getting return code 22, &#8216;fatal: git-http-push failed&#8217;.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mobiphil</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-10560</link>
		<dc:creator>mobiphil</dc:creator>
		<pubDate>Mon, 10 May 2010 21:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-10560</guid>
		<description>1. the "did you run git update-server-info" is a misleading error in this case, and in several other situations. The git guys should remove that
2. if the git-http-backend.sh is called, then it means that the real git-http-backend is not finding your project file, so you need to check if GIT_PROJECT_ROOT points to the right directory in the shell script</description>
		<content:encoded><![CDATA[<p>1. the &#8220;did you run git update-server-info&#8221; is a misleading error in this case, and in several other situations. The git guys should remove that<br />
2. if the git-http-backend.sh is called, then it means that the real git-http-backend is not finding your project file, so you need to check if GIT_PROJECT_ROOT points to the right directory in the shell script</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Elam</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-10557</link>
		<dc:creator>Tom Elam</dc:creator>
		<pubDate>Mon, 10 May 2010 20:07:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-10557</guid>
		<description>mobiphil,

I just upgraded git on the server and client to 1.7.1 from 1.7.0, but the symptoms are unchanged.</description>
		<content:encoded><![CDATA[<p>mobiphil,</p>
<p>I just upgraded git on the server and client to 1.7.1 from 1.7.0, but the symptoms are unchanged.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mobiphil</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-10510</link>
		<dc:creator>mobiphil</dc:creator>
		<pubDate>Sun, 09 May 2010 11:29:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-10510</guid>
		<description>Tom:

are you sure that you are on the latest git version both on the server and client?</description>
		<content:encoded><![CDATA[<p>Tom:</p>
<p>are you sure that you are on the latest git version both on the server and client?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Elam</title>
		<link>http://www.mobiphil.com/2010/03/git-on-shared-hosting-with-git-http-backend/#comment-10492</link>
		<dc:creator>Tom Elam</dc:creator>
		<pubDate>Sat, 08 May 2010 18:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mobiphil.com/?p=180#comment-10492</guid>
		<description>I noticed that git is not referring to a URL with the proper .htaccess, so I inserted 'website.com' in the URL passed to the git command.

I also noticed that my HTTP GET request wasn't being authenticated, so I tried the command 'git clone http://tomelam:passwordxxx@onthesame.org/website.com/git/myproject.git'. Now I'm getting the error 'fatal: http://tomelam:bmc4387@onthesamepage.org/website.com/git/myproject.git/info/refs not found: did you run git update-server-info on the server?' and WireShark captures the HTTP exchange:

GET /website.com/git/myproject.git/info/refs?service=git-upload-pack HTTP/1.1
HTTP/1.1 401 Authorization Required  (text/html)
GET /website.com/git/myproject.git/info/refs?service=git-upload-pack HTTP/1.1
HTTP/1.1 404 Not Found
GET /website.com/git/myproject.git/info/refs HTTP/1.1
HTTP/1.1 404 Not Found

I expected the GET request for /website.com/git/myproject.git/info/refs?service=git-upload-pack to be rewritten as a request for /git/git-http-backend.sh, and apparently it is, because I uncommented the logging in git-http-backend.sh and the following lines get printed to ~/logs/log:

service=git-upload-pack GET /myproject.git/info/refs
GET /myproject.git/info/refs</description>
		<content:encoded><![CDATA[<p>I noticed that git is not referring to a URL with the proper .htaccess, so I inserted &#8216;website.com&#8217; in the URL passed to the git command.</p>
<p>I also noticed that my HTTP GET request wasn&#8217;t being authenticated, so I tried the command &#8216;git clone <a href="http://tomelam:passwordxxx@onthesame.org/website.com/git/myproject.git" rel="nofollow">http://tomelam:passwordxxx@onthesame.org/website.com/git/myproject.git</a>&#8216;. Now I&#8217;m getting the error &#8216;fatal: <a href="http://tomelam:bmc4387@onthesamepage.org/website.com/git/myproject.git/info/refs" rel="nofollow">http://tomelam:bmc4387@onthesamepage.org/website.com/git/myproject.git/info/refs</a> not found: did you run git update-server-info on the server?&#8217; and WireShark captures the HTTP exchange:</p>
<p>GET /website.com/git/myproject.git/info/refs?service=git-upload-pack HTTP/1.1<br />
HTTP/1.1 401 Authorization Required  (text/html)<br />
GET /website.com/git/myproject.git/info/refs?service=git-upload-pack HTTP/1.1<br />
HTTP/1.1 404 Not Found<br />
GET /website.com/git/myproject.git/info/refs HTTP/1.1<br />
HTTP/1.1 404 Not Found</p>
<p>I expected the GET request for /website.com/git/myproject.git/info/refs?service=git-upload-pack to be rewritten as a request for /git/git-http-backend.sh, and apparently it is, because I uncommented the logging in git-http-backend.sh and the following lines get printed to ~/logs/log:</p>
<p>service=git-upload-pack GET /myproject.git/info/refs<br />
GET /myproject.git/info/refs</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.313 seconds -->

