{"thread":{"id":"12184","subject":"cant get git to work over http","startedAt":"2008-02-19T00:49:33Z","lastAt":"2008-02-20T13:46:33Z","messageCount":22,"participants":["Anatoly Yakovenko","Mike Hommey","Johannes Schindelin","Jon Loeliger","Jeff King","Robert Haines","Anton Gladkov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69219","messageId":"e26d18e40802181649l3c03df82l4eb91c88bec47bf4@mail.gmail.com","threadId":"12184","inReplyTo":null,"subject":"cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T00:49:33Z","receivedAt":"2008-02-19T00:49:33Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"so this is as fun as pulling teeth\n\ni have been following this guide,\nhttp://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n\nbut no matter what i do, when i try to do the initial push, git just\nhangs without any messages.  I have nothing in my apache server error\nlog, but i have this in the accesslog:\n\n*.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] \"PROPFIND /git/repo\nHTTP/1.1\" 301 320\n\nis there any way to get more verbose output out of git?\n"},{"id":"69235","messageId":"20080219063937.GB3819@glandium.org","threadId":"12184","inReplyTo":"e26d18e40802181649l3c03df82l4eb91c88bec47bf4@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-02-19T06:39:37Z","receivedAt":"2008-02-19T06:39:37Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Mon, Feb 18, 2008 at 04:49:33PM -0800, Anatoly Yakovenko wrote:\n> so this is as fun as pulling teeth\n> \n> i have been following this guide,\n> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n> \n> but no matter what i do, when i try to do the initial push, git just\n> hangs without any messages.  I have nothing in my apache server error\n> log, but i have this in the accesslog:\n> \n> *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] \"PROPFIND /git/repo\n> HTTP/1.1\" 301 320\n\nTry adding a / at the end of the url you use for your repo.\n\nMike\n"},{"id":"69237","messageId":"e26d18e40802182309l693b2099wb42573aca7348091@mail.gmail.com","threadId":"12184","inReplyTo":"20080219063937.GB3819@glandium.org","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T07:09:39Z","receivedAt":"2008-02-19T07:09:39Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> > *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] \"PROPFIND /git/repo\n> > HTTP/1.1\" 301 320\n>\n> Try adding a / at the end of the url you use for your repo.\n\nah cool, that was it.  The initial push seems to have worked,\n\n$ git push -v upload master\nPushing to http://aeyakovenko@myserver.com/git/repo/\nGetting pack list\nFetching remote heads...\n  refs/\n  refs/tags/\n  refs/heads/\n'refs/heads/master': up-to-date\n\n\nbut i cant clone or just normally push and pull the repo.\n\n$ git-pull\nfatal: 'origin': unable to chdir or not a git archive\nfatal: The remote end hung up unexpectedly\n\nand\n\n$ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar\nInitialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/\ncat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:\nNo such file or directory\n/usr/bin/git-clone: line 450: cd:\n/home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such\nfile or directory\nfatal: : not a valid SHA1\nfatal: Not a valid object name HEAD\n"},{"id":"69247","messageId":"20080219093943.GA31006@glandium.org","threadId":"12184","inReplyTo":"e26d18e40802182309l693b2099wb42573aca7348091@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-02-19T09:39:45Z","receivedAt":"2008-02-19T09:39:45Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Mon, Feb 18, 2008 at 11:09:39PM -0800, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:\n> > > *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] \"PROPFIND /git/repo\n> > > HTTP/1.1\" 301 320\n> >\n> > Try adding a / at the end of the url you use for your repo.\n> \n> ah cool, that was it.  The initial push seems to have worked,\n> \n> $ git push -v upload master\n> Pushing to http://aeyakovenko@myserver.com/git/repo/\n> Getting pack list\n> Fetching remote heads...\n>   refs/\n>   refs/tags/\n>   refs/heads/\n> 'refs/heads/master': up-to-date\n> \n> but i cant clone or just normally push and pull the repo.\n> \n> $ git-pull\n> fatal: 'origin': unable to chdir or not a git archive\n> fatal: The remote end hung up unexpectedly\n\nTry again with the GIT_CURL_VERBOSE variable set to 1 and try to see\nif everything looks right in requests and responses.\n\n> and\n> \n> $ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar\n> Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/\n> cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:\n> No such file or directory\n> /usr/bin/git-clone: line 450: cd:\n> /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such\n> file or directory\n> fatal: : not a valid SHA1\n> fatal: Not a valid object name HEAD\n\nThe error message is strange... Anyways, you might want to run this command\nunder sh -x (i.e. sh -x $(which git-clone) http://aeyakovenko@myserver.com/git/repo/ foobar)\nWhat version of git are you using ?\n\nMike\n"},{"id":"69251","messageId":"alpine.LSU.1.00.0802191115440.30505@racer.site","threadId":"12184","inReplyTo":"e26d18e40802182309l693b2099wb42573aca7348091@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T11:18:01Z","receivedAt":"2008-02-19T11:18:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 18 Feb 2008, Anatoly Yakovenko wrote:\n\n> > > *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] \"PROPFIND /git/repo\n> > > HTTP/1.1\" 301 320\n> >\n> > Try adding a / at the end of the url you use for your repo.\n> \n> ah cool, that was it.  The initial push seems to have worked,\n> \n> $ git push -v upload master\n> Pushing to http://aeyakovenko@myserver.com/git/repo/\n> Getting pack list\n> Fetching remote heads...\n>   refs/\n>   refs/tags/\n>   refs/heads/\n> 'refs/heads/master': up-to-date\n> \n> \n> but i cant clone or just normally push and pull the repo.\n\nThat's not correct.  You can clone, push and pull the repo.\n\n> $ git-pull\n> fatal: 'origin': unable to chdir or not a git archive\n> fatal: The remote end hung up unexpectedly\n\nSince you did not clone from anywhere, the remote \"origin\" is not set.  \nYou will have to do that yourself:\n\n\tgit remote add -f origin http://aeyakovenko@myserver.com/git/repo/\n\n> $ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar\n> Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/\n> cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:\n> No such file or directory\n> /usr/bin/git-clone: line 450: cd:\n> /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such\n> file or directory\n> fatal: : not a valid SHA1\n> fatal: Not a valid object name HEAD\n\nThat smells like another \"master\"-less repository.  Why do people do that?  \nIsn't it just _easier_ and more _hassle-free_ to just accept that the \ninitial branch is called \"master\"?\n\nHth,\nDscho\n"},{"id":"69298","messageId":"e26d18e40802191019j48a1ceadk4887ffc35100ab0a@mail.gmail.com","threadId":"12184","inReplyTo":"alpine.LSU.1.00.0802191115440.30505@racer.site","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T18:19:06Z","receivedAt":"2008-02-19T18:19:06Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> > $ git-pull\n> > fatal: 'origin': unable to chdir or not a git archive\n> > fatal: The remote end hung up unexpectedly\n>\n> Since you did not clone from anywhere, the remote \"origin\" is not set.\n> You will have to do that yourself:\n>\n>         git remote add -f origin http://aeyakovenko@myserver.com/git/repo/\n\nThanks, that worked.  but push still gives me an error:\n\n$ git pull\nYou asked me to pull without telling me which branch you\nwant to merge with, and 'branch.master.merge' in\nyour configuration file does not tell me either.  Please\nname which branch you want to merge on the command line and\ntry again (e.g. 'git pull <repository> <refspec>').\nSee git-pull(1) for details on the refspec.\n\nIf you often merge with the same branch, you may want to\nconfigure the following variables in your configuration\nfile:\n\n    branch.master.remote = <nickname>\n    branch.master.merge = <remote-ref>\n    remote.<nickname>.url = <url>\n    remote.<nickname>.fetch = <refspec>\n\nSee git-config(1) for details\n\n>\n> > $ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar\n> > Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/\n> > cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:\n> > No such file or directory\n> > /usr/bin/git-clone: line 450: cd:\n> > /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such\n> > file or directory\n> > fatal: : not a valid SHA1\n> > fatal: Not a valid object name HEAD\n>\n> That smells like another \"master\"-less repository.  Why do people do that?\n> Isn't it just _easier_ and more _hassle-free_ to just accept that the\n> initial branch is called \"master\"?\n\nwhat do you mean by master-less?  I would love to just be able to\ncreate a normal git repo with \"git-init\" and clone it over http the\nsame way that i do over ssh and the filesystem.  but when I do that\nover http i get this error:\n\n$ git-clone http://aeyakovenko@myserver.com/git/repo/ repo\nInitialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\nand running `git-update-server-info` does nothing.\n"},{"id":"69299","messageId":"47BB1EC0.601@freescale.com","threadId":"12184","inReplyTo":"e26d18e40802191019j48a1ceadk4887ffc35100ab0a@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2008-02-19T18:24:00Z","receivedAt":"2008-02-19T18:24:00Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"Anatoly Yakovenko wrote:\n>>> $ git-pull\n>>> fatal: 'origin': unable to chdir or not a git archive\n>>> fatal: The remote end hung up unexpectedly\n>> Since you did not clone from anywhere, the remote \"origin\" is not set.\n>> You will have to do that yourself:\n>>\n>>         git remote add -f origin http://aeyakovenko@myserver.com/git/repo/\n> \n> Thanks, that worked.  but push still gives me an error:\n> \n> $ git pull\n> You asked me to pull without telling me which branch you\n> want to merge with, and 'branch.master.merge' in\n> your configuration file does not tell me either.  Please\n> name which branch you want to merge on the command line and\n> try again (e.g. 'git pull <repository> <refspec>').\n> See git-pull(1) for details on the refspec.\n> \n> If you often merge with the same branch, you may want to\n> configure the following variables in your configuration\n> file:\n> \n>     branch.master.remote = <nickname>\n>     branch.master.merge = <remote-ref>\n>     remote.<nickname>.url = <url>\n>     remote.<nickname>.fetch = <refspec>\n> \n> See git-config(1) for details\n\nDid you follow this advice?  You've set up the\norigin's URL now, and so it knows from where the\nfetch step will happen, but have you set up the\nmerge step yet?  Does it know what branches to\nmerge on that pull request?\n\njdl\n"},{"id":"69301","messageId":"e26d18e40802191106v51c907bdn6aa51acef5f530a3@mail.gmail.com","threadId":"12184","inReplyTo":"47BB1EC0.601@freescale.com","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T19:06:13Z","receivedAt":"2008-02-19T19:06:13Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> > If you often merge with the same branch, you may want to\n> > configure the following variables in your configuration\n> > file:\n> >\n> >     branch.master.remote = <nickname>\n> >     branch.master.merge = <remote-ref>\n> >     remote.<nickname>.url = <url>\n> >     remote.<nickname>.fetch = <refspec>\n> >\n> > See git-config(1) for details\n>\n> Did you follow this advice?  You've set up the\n> origin's URL now, and so it knows from where the\n> fetch step will happen, but have you set up the\n> merge step yet?  Does it know what branches to\n> merge on that pull request?\n\ni dont understand what these values should be.\nhttp://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n doesn't mention anything about configuring them.  So why cant i have\ngit working the same way over http as it does over ssh and the\nfilesystem?\n"},{"id":"69302","messageId":"alpine.LSU.1.00.0802191916020.7797@racer.site","threadId":"12184","inReplyTo":"e26d18e40802191106v51c907bdn6aa51acef5f530a3@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T19:19:49Z","receivedAt":"2008-02-19T19:19:49Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Feb 2008, Anatoly Yakovenko wrote:\n\n> > > If you often merge with the same branch, you may want to\n> > > configure the following variables in your configuration\n> > > file:\n> > >\n> > >     branch.master.remote = <nickname>\n> > >     branch.master.merge = <remote-ref>\n> > >     remote.<nickname>.url = <url>\n> > >     remote.<nickname>.fetch = <refspec>\n> > >\n> > > See git-config(1) for details\n> >\n> > Did you follow this advice?  You've set up the\n> > origin's URL now, and so it knows from where the\n> > fetch step will happen, but have you set up the\n> > merge step yet?  Does it know what branches to\n> > merge on that pull request?\n> \n> i dont understand what these values should be. \n> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n>  doesn't mention anything about configuring them.  So why cant i have \n> git working the same way over http as it does over ssh and the \n> filesystem?\n\nYou can.  But please understand that there is a difference from having \ncloned from somewhere, or setting up an uncloned repository.\n\nYou are experiencing that it is not all that easy to set up tracking \ninformation when your local branch is the original, and the remote was \ninitialised with your local branch.\n\nSo the documentation you quoted does not help.  You are supposed to know \nenough about git details, such as where to find out what the \nbranch.*.remote and branch.*.merge settings mean, before reading \nsetup-git-server-over-http.txt.\n\nCiao,\nDscho\n"},{"id":"69304","messageId":"e26d18e40802191127v7cc9f051l7002b56b41dc9f86@mail.gmail.com","threadId":"12184","inReplyTo":"alpine.LSU.1.00.0802191916020.7797@racer.site","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T19:27:43Z","receivedAt":"2008-02-19T19:27:43Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> You can.  But please understand that there is a difference from having\n> cloned from somewhere, or setting up an uncloned repository.\n\nok, so how do i set up an empty git repository over http, like i would\nover ssh of the fs?\n"},{"id":"69305","messageId":"alpine.LSU.1.00.0802191940260.7826@racer.site","threadId":"12184","inReplyTo":"e26d18e40802191127v7cc9f051l7002b56b41dc9f86@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T19:41:57Z","receivedAt":"2008-02-19T19:41:57Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Feb 2008, Anatoly Yakovenko wrote:\n\n> > You can.  But please understand that there is a difference from having \n> > cloned from somewhere, or setting up an uncloned repository.\n> \n> ok, so how do i set up an empty git repository over http, like i would \n> over ssh of the fs?\n\nYou set up the git repsitory via http, so where is the problem?\n\nIf you don't know how to set up the tracking information, why not just \nreclone?\n\nAlternatively, you can read up on how to set up that information in the \nuser manual.\n\nHth,\nDscho\n"},{"id":"69306","messageId":"e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com","threadId":"12184","inReplyTo":"alpine.LSU.1.00.0802191940260.7826@racer.site","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T19:53:58Z","receivedAt":"2008-02-19T19:53:58Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> You set up the git repsitory via http, so where is the problem?\n\n ok, i created a directory on my server.  Dav is on and working, i can\nsend and download files using IE on that url.\n\nSo is it possible for me to just simply run \"git-init\" in that\ndirectory, and treat that url as i would a repo over ssh or the fs?\n\ni can do this:\n\n$ git-clone /var/www/localhost/htdocs/git/repo/ repo\nInitialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\n1 block\n\nand i can do this:\n\n$ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\nInitialized empty Git repository in /home/aeyakovenko/projects/repo/repo/.git/\naeyakovenko@localhost's password:\nReceiving objects: 100% (3/3), done.\nremote: Counting objects: 3, done.\nremote: Total 3 (delta 0), reused 0 (delta 0)\n\nbut for the life of me i cant do this:\n\n$ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\nInitialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n"},{"id":"69307","messageId":"alpine.LSU.1.00.0802191956420.7826@racer.site","threadId":"12184","inReplyTo":"e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T19:57:20Z","receivedAt":"2008-02-19T19:57:20Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Feb 2008, Anatoly Yakovenko wrote:\n\n> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n\nMaybe run \"git update-server-info\" in that directory?\n\nHth,\nDscho\n"},{"id":"69308","messageId":"20080219195745.GB5427@coredump.intra.peff.net","threadId":"12184","inReplyTo":"e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-19T19:57:45Z","receivedAt":"2008-02-19T19:57:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 19, 2008 at 11:53:58AM -0800, Anatoly Yakovenko wrote:\n\n> but for the life of me i cant do this:\n> \n> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n\nIs your webserver exporting \"/\"? Or should it be\n\"http://aeyakovenko@localhost/git/repo\"? If the path is correct, did you\nrun git-update-server-info in the repository you are trying to clone?\n\n-Peff\n"},{"id":"69309","messageId":"47BB3691.9040809@freescale.com","threadId":"12184","inReplyTo":"e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2008-02-19T20:05:37Z","receivedAt":"2008-02-19T20:05:37Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"Anatoly Yakovenko wrote:\n>\n> $ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/repo/repo/.git/\n> aeyakovenko@localhost's password:\n> Receiving objects: 100% (3/3), done.\n> remote: Counting objects: 3, done.\n> remote: Total 3 (delta 0), reused 0 (delta 0)\n> \n> but for the life of me i cant do this:\n> \n> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n\nPonder the Doc Root for an HTTP request.  Remember that your httpd\nwill likely be striping or rewriting that base directory path and\nso it won't be needed on your git http:// requests.\n\nSince my repository was outside of the basic Doc Root, and I wanted\nto present similar path names to both git: and http: protocols, I\nended up rewriting some URL paths.  Also, if you have some form of\nvirtual hosting going on, you might need to do a virtualization\nrewriting using --interpolated-path=pathtemplate.\n\nHTH,\njdl\n"},{"id":"69310","messageId":"e26d18e40802191305y5f7b8fdfr3113c84612c53189@mail.gmail.com","threadId":"12184","inReplyTo":"47BB3691.9040809@freescale.com","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T21:05:00Z","receivedAt":"2008-02-19T21:05:00Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> > but for the life of me i cant do this:\n> >\n> > $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo\n> > Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/\n> > Cannot get remote repository information.\n> > Perhaps git-update-server-info needs to be run there?\n>\n> Ponder the Doc Root for an HTTP request.  Remember that your httpd\n> will likely be striping or rewriting that base directory path and\n> so it won't be needed on your git http:// requests.\n>\n> Since my repository was outside of the basic Doc Root, and I wanted\n> to present similar path names to both git: and http: protocols, I\n> ended up rewriting some URL paths.  Also, if you have some form of\n> virtual hosting going on, you might need to do a virtualization\n> rewriting using --interpolated-path=pathtemplate.\n\nso, basically i need to append a .git to the repository root?  I am\ngetting these http requests in the access log:\n\n72.192.162.186 - aeyakovenko [19/Feb/2008:12:58:13 -0800] \"GET\n/var/www/localhost/htdocs/git/repo/info/refs HTTP/1.1\" 404 313\n\n/var/www/localhost/htdocs/git/repo/info/refs doesn't exist, although\nthis exists:\n\n/var/www/localhost/htdocs/git/repo/.git/info/refs\n\nSo why doesn't the http protocol handle this?  I can access\nhttp://localhost/git/repo/.git/info/refs  through the browser without\na problem.  Is there any way to configure http protocol to just treat\nthe repository the same way ssh and fs does?\n\nThanks,\nAnatoly\n"},{"id":"69320","messageId":"47BB5037.5090302@freescale.com","threadId":"12184","inReplyTo":"e26d18e40802191305y5f7b8fdfr3113c84612c53189@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2008-02-19T21:55:03Z","receivedAt":"2008-02-19T21:55:03Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"Anatoly Yakovenko wrote:\n\n> so, basically i need to append a .git to the repository root?  I am\n> getting these http requests in the access log:\n> \n> 72.192.162.186 - aeyakovenko [19/Feb/2008:12:58:13 -0800] \"GET\n> /var/www/localhost/htdocs/git/repo/info/refs HTTP/1.1\" 404 313\n> \n> /var/www/localhost/htdocs/git/repo/info/refs doesn't exist, although\n> this exists:\n> \n> /var/www/localhost/htdocs/git/repo/.git/info/refs\n> \n\nSomething is fishy here.  Is your repository bare or not?\n\njdl\n"},{"id":"69321","messageId":"e26d18e40802191359r4c435818n4ae7b357d452d51e@mail.gmail.com","threadId":"12184","inReplyTo":"47BB5037.5090302@freescale.com","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T21:59:39Z","receivedAt":"2008-02-19T21:59:39Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"> Something is fishy here.  Is your repository bare or not?\n\nno, why does it need to be bare?\n"},{"id":"69324","messageId":"e26d18e40802191413w48fe4a71hd7895b09d15cb44e@mail.gmail.com","threadId":"12184","inReplyTo":"e26d18e40802191359r4c435818n4ae7b357d452d51e@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Anatoly Yakovenko","fromEmail":"aeyakovenko@gmail.com","sentAt":"2008-02-19T22:13:30Z","receivedAt":"2008-02-19T22:13:30Z","isPatch":false,"sender":{"key":"aeyakovenko@gmail.com","avatar":"https://gravatar.com/avatar/e9c7bbbeb8dfc45fc901551c15d459b7531e27bce344e15fc8f3aa39c8511a7f?d=mp&s=160"},"body":"On Feb 19, 2008 1:59 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:\n> > Something is fishy here.  Is your repository bare or not?\n>\n> no, why does it need to be bare?\n>\nso bare or not ssh works but http doesnt:\n\n$ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/bare\nbare-ssh\nInitialized empty Git repository in /home/aeyakovenko/projects/bare-ssh/.git/\nReceiving objects: 100% (3/3), done.\nremote: Counting objects: 3, done.\nremote: Total 3 (delta 0), reused 0 (delta 0)\n\n\n\nand running over a bare directory doesn't work:\n\n\n$ git-clone http://aeyakovenko@localhost/git/bare bare\nInitialized empty Git repository in /home/aeyakovenko/projects/bare/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\napache acess log:\n\n127.0.0.1 - - [19/Feb/2008:14:10:19 -0800] \"GET /git/bare/info/refs\nHTTP/1.1\" 401 460\n\ni feel like i am taking crazy pills, why is apache looking for\n/git/bare/info/refs, and no the directory from the doc root?\n"},{"id":"69325","messageId":"alpine.LSU.1.00.0802192217250.7826@racer.site","threadId":"12184","inReplyTo":"e26d18e40802191413w48fe4a71hd7895b09d15cb44e@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T22:20:24Z","receivedAt":"2008-02-19T22:20:24Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Feb 2008, Anatoly Yakovenko wrote:\n\n> On Feb 19, 2008 1:59 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:\n> > > Something is fishy here.  Is your repository bare or not?\n> >\n> > no, why does it need to be bare?\n> >\n> so bare or not ssh works but http doesnt:\n\nHaving a non-bare repository on a web server does not make sense at all.  \nIt's not like you will be developing in there, right?\n\nAnd yes, you can append \"/.git/\" to your URL and it should work fine.  \nHTTP transport is a second class citizen, and will probably never be as \nefficient as GIT transport.\n\nTherefore, you can choose to continue your efforts with the http:// URL, \nbut are mostly on your own, or you can go with ssh (git://) and it just \nworks.\n\nUnfortunately, I do not have the time to help you more.\n\nCiao,\nDscho\n"},{"id":"69364","messageId":"D5916873-1703-41A2-BDE8-97B3D9038194@manchester.ac.uk","threadId":"12184","inReplyTo":"e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Robert Haines","fromEmail":"rhaines@manchester.ac.uk","sentAt":"2008-02-20T10:39:19Z","receivedAt":"2008-02-20T10:39:19Z","isPatch":false,"sender":{"key":"rhaines@manchester.ac.uk","avatar":null},"body":"> i can do this:\n>\n> $ git-clone /var/www/localhost/htdocs/git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/ \n> repo/.git/\n> 1 block\n>\n> and i can do this:\n>\n> $ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/ \n> git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/repo/ \n> repo/.git/\n> aeyakovenko@localhost's password:\n> Receiving objects: 100% (3/3), done.\n> remote: Counting objects: 3, done.\n> remote: Total 3 (delta 0), reused 0 (delta 0)\n>\n> but for the life of me i cant do this:\n>\n> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/ \n> git/repo/ repo\n> Initialized empty Git repository in /home/aeyakovenko/projects/ \n> repo/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n\nWhat is the document root set to on your web server? It shouldn't be  \n'/'! When doing git over ssh you need the whole path, but when over  \nhttp you just need the path from the document root...\n\nSo I would expect that your http clone should be:\n$ git-clone http://aeyakovenko@localhost/git/repo/ repo\n\nWhat happens when you point a web browser at either http:// \naeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ or http:// \naeyakovenko@localhost/git/repo/ ?\n\nCheers,\nRob\n"},{"id":"69370","messageId":"20080220134633.GA4220@atn.sw.ru","threadId":"12184","inReplyTo":"e26d18e40802191413w48fe4a71hd7895b09d15cb44e@mail.gmail.com","subject":"Re: cant get git to work over http","fromName":"Anton Gladkov","fromEmail":"agladkov@parallels.com","sentAt":"2008-02-20T13:46:33Z","receivedAt":"2008-02-20T13:46:33Z","isPatch":false,"sender":{"key":"agladkov@parallels.com","avatar":null},"body":"On Tue, Feb 19, 2008 at 02:13:30PM -0800, Anatoly Yakovenko wrote:\n> On Feb 19, 2008 1:59 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:\n> > > Something is fishy here.  Is your repository bare or not?\n> >\n> > no, why does it need to be bare?\n> >\n> so bare or not ssh works but http doesnt:\n> \n> $ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/bare\n> bare-ssh\n> Initialized empty Git repository in /home/aeyakovenko/projects/bare-ssh/.git/\n> Receiving objects: 100% (3/3), done.\n> remote: Counting objects: 3, done.\n> remote: Total 3 (delta 0), reused 0 (delta 0)\n> \n> \n> \n> and running over a bare directory doesn't work:\n> \n> \n> $ git-clone http://aeyakovenko@localhost/git/bare bare\n\n'Bare' means cloning with '--bare' option.\n\n> Initialized empty Git repository in /home/aeyakovenko/projects/bare/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n> \n> apache acess log:\n> \n> 127.0.0.1 - - [19/Feb/2008:14:10:19 -0800] \"GET /git/bare/info/refs\n> HTTP/1.1\" 401 460\n> \n> i feel like i am taking crazy pills, why is apache looking for\n> /git/bare/info/refs, and no the directory from the doc root?\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \nBest regards,\n\t\tanton\nmailto:agladkov@sw.ru\n"}]}