* Error in creating git over http [not found] <51123DD1BF2E03418A1296748DA730927454460F@ibwmbx03> @ 2013-10-08 15:05 ` Shlomit Afgin 2013-10-10 1:06 ` Jeff King 0 siblings, 1 reply; 3+ messages in thread From: Shlomit Afgin @ 2013-10-08 15:05 UTC (permalink / raw) To: git@vger.kernel.org I'm trying to set a http git server. I do the following on the git server: cd /var/www/html/ git clone --bare /path/to/dir/ gitproject.git cd gitproject.git/ mv hooks/post-update.sample hooks/post-update chmod a+x hooks/post-update on the local machine run: git clone http://server.name/gitproject.git I got the error: "Initialized empty Git repository in /local/path/gitproject/.git/ fatal: http://server.name/gitproject.git/info/refs not found: did you run git update-server-info on the server?" I saw that the file does not exist, it seem that the file post-update is not execute. I run it on the git server: git update-server-info Now the info/ref is created. On local machine I run again : git clone http://server.name/gitproject.git Now I get the error: Initialized empty Git repository in /local/path/gitproject/.git/ error: The requested URL returned error: 403 (curl_result = 22, http_code = 403, sha1 = 9d83b83df9fbc75ecd754264f95793fca93ccf93) error: Unable to find 9d83b83df9fbc75ecd754264f95793fca93ccf93 under http://server.name/gitproject.git Cannot obtain needed object 9d83b83df9fbc75ecd754264f95793fca93ccf93 What I'm doing wrong? Any ideas are welcome. Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error in creating git over http 2013-10-08 15:05 ` Error in creating git over http Shlomit Afgin @ 2013-10-10 1:06 ` Jeff King 2013-10-10 5:25 ` Shlomit Afgin 0 siblings, 1 reply; 3+ messages in thread From: Jeff King @ 2013-10-10 1:06 UTC (permalink / raw) To: Shlomit Afgin; +Cc: git@vger.kernel.org On Tue, Oct 08, 2013 at 03:05:22PM +0000, Shlomit Afgin wrote: > I do the following on the git server: > cd /var/www/html/ > git clone --bare /path/to/dir/ gitproject.git > cd gitproject.git/ > mv hooks/post-update.sample hooks/post-update > chmod a+x hooks/post-update OK, so on the next push, the info/refs file should be updated. Note that this file is only necessary if you want to run the "dumb" http protocol (i.e., the less efficient one that does not require git on the server). You didn't say whether you are trying to set up a "dumb" or "smart" git-http server. These days you almost certainly want to set up a "smart" one, and you do not need to care about info/refs or running update-server-info. > on the local machine run: > git clone http://server.name/gitproject.git > > I got the error: > "Initialized empty Git repository in /local/path/gitproject/.git/ > fatal: http://server.name/gitproject.git/info/refs not found: did you run > git update-server-info on the server?" > > I saw that the file does not exist, it seem that the file post-update is > not execute. Yes, if you didn't push yet, then it won't have been created. > I run it on the git server: > git update-server-info > > Now the info/ref is created. OK, good. > On local machine I run again : > git clone http://server.name/gitproject.git > > Now I get the error: > Initialized empty Git repository in /local/path/gitproject/.git/ > error: The requested URL returned error: 403 (curl_result = 22, http_code > = 403, sha1 = 9d83b83df9fbc75ecd754264f95793fca93ccf93) > error: Unable to find 9d83b83df9fbc75ecd754264f95793fca93ccf93 under > http://server.name/gitproject.git > Cannot obtain needed object 9d83b83df9fbc75ecd754264f95793fca93ccf93 403 is an HTTP "Forbidden". Have you configured your web server to allow access to the project? Have you marked the repository as git-daemon-export-ok, as described in "git help http-backend" (or set GIT_HTTP_EXPORT_ALL in the environment)? Is there anything interesting in the webserver's error logs? If it is still not working after checking those things, can you show us how you have configured your webserver (presumably apache?). -Peff ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error in creating git over http 2013-10-10 1:06 ` Jeff King @ 2013-10-10 5:25 ` Shlomit Afgin 0 siblings, 0 replies; 3+ messages in thread From: Shlomit Afgin @ 2013-10-10 5:25 UTC (permalink / raw) To: Jeff King; +Cc: git@vger.kernel.org Thanks for your answer. I did not know about "dumb" and "smart" I will read on those in the future. I found in google that the problem of Error: 403 can be solved. I run on the git server, in the directory that had the repository: 'git gc' which do git cleanup and the problem solved. Thanks you very much. On 10/10/13 3:06 AM, "Jeff King" <peff@peff.net> wrote: >On Tue, Oct 08, 2013 at 03:05:22PM +0000, Shlomit Afgin wrote: > >> I do the following on the git server: >> cd /var/www/html/ >> git clone --bare /path/to/dir/ gitproject.git >> cd gitproject.git/ >> mv hooks/post-update.sample hooks/post-update >> chmod a+x hooks/post-update > >OK, so on the next push, the info/refs file should be updated. Note that >this file is only necessary if you want to run the "dumb" http protocol >(i.e., the less efficient one that does not require git on the server). > >You didn't say whether you are trying to set up a "dumb" or "smart" >git-http server. These days you almost certainly want to set up a >"smart" one, and you do not need to care about info/refs or running >update-server-info. > >> on the local machine run: >> git clone http://server.name/gitproject.git >> >> I got the error: >> "Initialized empty Git repository in /local/path/gitproject/.git/ >> fatal: http://server.name/gitproject.git/info/refs not found: did you >>run >> git update-server-info on the server?" >> >> I saw that the file does not exist, it seem that the file post-update >>is >> not execute. > >Yes, if you didn't push yet, then it won't have been created. > >> I run it on the git server: >> git update-server-info >> >> Now the info/ref is created. > >OK, good. > >> On local machine I run again : >> git clone http://server.name/gitproject.git >> >> Now I get the error: >> Initialized empty Git repository in /local/path/gitproject/.git/ >> error: The requested URL returned error: 403 (curl_result = 22, >>http_code >> = 403, sha1 = 9d83b83df9fbc75ecd754264f95793fca93ccf93) >> error: Unable to find 9d83b83df9fbc75ecd754264f95793fca93ccf93 under >> http://server.name/gitproject.git >> Cannot obtain needed object 9d83b83df9fbc75ecd754264f95793fca93ccf93 > >403 is an HTTP "Forbidden". Have you configured your web server to allow >access to the project? Have you marked the repository as >git-daemon-export-ok, as described in "git help http-backend" (or set >GIT_HTTP_EXPORT_ALL in the environment)? Is there anything interesting >in the webserver's error logs? > >If it is still not working after checking those things, can you show us >how you have configured your webserver (presumably apache?). > >-Peff ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-10 5:25 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <51123DD1BF2E03418A1296748DA730927454460F@ibwmbx03> 2013-10-08 15:05 ` Error in creating git over http Shlomit Afgin 2013-10-10 1:06 ` Jeff King 2013-10-10 5:25 ` Shlomit Afgin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).