# cant get git to work over http

22 messages from 2008-02-19 to 2008-02-20. Participants: Anatoly Yakovenko, Mike Hommey, Johannes Schindelin, Jon Loeliger, Jeff King, Robert Haines, Anton Gladkov.
Thread: https://gitlist.dev/t/12184

## Anatoly Yakovenko, 2008-02-19 00:49

Subject: cant get git to work over http
Message-ID: <e26d18e40802181649l3c03df82l4eb91c88bec47bf4@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802181649l3c03df82l4eb91c88bec47bf4%40mail.gmail.com

```
so this is as fun as pulling teeth

i have been following this guide,
http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt

but no matter what i do, when i try to do the initial push, git just
hangs without any messages.  I have nothing in my apache server error
log, but i have this in the accesslog:

*.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] "PROPFIND /git/repo
HTTP/1.1" 301 320

is there any way to get more verbose output out of git?

```

## Mike Hommey, 2008-02-19 06:39

Subject: Re: cant get git to work over http
Message-ID: <20080219063937.GB3819@glandium.org>
URL: https://gitlist.dev/e/20080219063937.GB3819%40glandium.org
In-Reply-To: <e26d18e40802181649l3c03df82l4eb91c88bec47bf4@mail.gmail.com>

```
On Mon, Feb 18, 2008 at 04:49:33PM -0800, Anatoly Yakovenko wrote:
> so this is as fun as pulling teeth
> 
> i have been following this guide,
> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
> 
> but no matter what i do, when i try to do the initial push, git just
> hangs without any messages.  I have nothing in my apache server error
> log, but i have this in the accesslog:
> 
> *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] "PROPFIND /git/repo
> HTTP/1.1" 301 320

Try adding a / at the end of the url you use for your repo.

Mike

```

## Anatoly Yakovenko, 2008-02-19 07:09

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802182309l693b2099wb42573aca7348091@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802182309l693b2099wb42573aca7348091%40mail.gmail.com
In-Reply-To: <20080219063937.GB3819@glandium.org>

```
> > *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] "PROPFIND /git/repo
> > HTTP/1.1" 301 320
>
> Try adding a / at the end of the url you use for your repo.

ah cool, that was it.  The initial push seems to have worked,

$ git push -v upload master
Pushing to http://aeyakovenko@myserver.com/git/repo/
Getting pack list
Fetching remote heads...
  refs/
  refs/tags/
  refs/heads/
'refs/heads/master': up-to-date


but i cant clone or just normally push and pull the repo.

$ git-pull
fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

and

$ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar
Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/
cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:
No such file or directory
/usr/bin/git-clone: line 450: cd:
/home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such
file or directory
fatal: : not a valid SHA1
fatal: Not a valid object name HEAD

```

## Mike Hommey, 2008-02-19 09:39

Subject: Re: cant get git to work over http
Message-ID: <20080219093943.GA31006@glandium.org>
URL: https://gitlist.dev/e/20080219093943.GA31006%40glandium.org
In-Reply-To: <e26d18e40802182309l693b2099wb42573aca7348091@mail.gmail.com>

```
On Mon, Feb 18, 2008 at 11:09:39PM -0800, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:
> > > *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] "PROPFIND /git/repo
> > > HTTP/1.1" 301 320
> >
> > Try adding a / at the end of the url you use for your repo.
> 
> ah cool, that was it.  The initial push seems to have worked,
> 
> $ git push -v upload master
> Pushing to http://aeyakovenko@myserver.com/git/repo/
> Getting pack list
> Fetching remote heads...
>   refs/
>   refs/tags/
>   refs/heads/
> 'refs/heads/master': up-to-date
> 
> but i cant clone or just normally push and pull the repo.
> 
> $ git-pull
> fatal: 'origin': unable to chdir or not a git archive
> fatal: The remote end hung up unexpectedly

Try again with the GIT_CURL_VERBOSE variable set to 1 and try to see
if everything looks right in requests and responses.

> and
> 
> $ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar
> Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/
> cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:
> No such file or directory
> /usr/bin/git-clone: line 450: cd:
> /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such
> file or directory
> fatal: : not a valid SHA1
> fatal: Not a valid object name HEAD

The error message is strange... Anyways, you might want to run this command
under sh -x (i.e. sh -x $(which git-clone) http://aeyakovenko@myserver.com/git/repo/ foobar)
What version of git are you using ?

Mike

```

## Johannes Schindelin, 2008-02-19 11:18

Subject: Re: cant get git to work over http
Message-ID: <alpine.LSU.1.00.0802191115440.30505@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802191115440.30505%40racer.site
In-Reply-To: <e26d18e40802182309l693b2099wb42573aca7348091@mail.gmail.com>

```
Hi,

On Mon, 18 Feb 2008, Anatoly Yakovenko wrote:

> > > *.*.*.*- foobar [18/Feb/2008:16:40:12 -0800] "PROPFIND /git/repo
> > > HTTP/1.1" 301 320
> >
> > Try adding a / at the end of the url you use for your repo.
> 
> ah cool, that was it.  The initial push seems to have worked,
> 
> $ git push -v upload master
> Pushing to http://aeyakovenko@myserver.com/git/repo/
> Getting pack list
> Fetching remote heads...
>   refs/
>   refs/tags/
>   refs/heads/
> 'refs/heads/master': up-to-date
> 
> 
> but i cant clone or just normally push and pull the repo.

That's not correct.  You can clone, push and pull the repo.

> $ git-pull
> fatal: 'origin': unable to chdir or not a git archive
> fatal: The remote end hung up unexpectedly

Since you did not clone from anywhere, the remote "origin" is not set.  
You will have to do that yourself:

	git remote add -f origin http://aeyakovenko@myserver.com/git/repo/

> $ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar
> Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/
> cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:
> No such file or directory
> /usr/bin/git-clone: line 450: cd:
> /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such
> file or directory
> fatal: : not a valid SHA1
> fatal: Not a valid object name HEAD

That smells like another "master"-less repository.  Why do people do that?  
Isn't it just _easier_ and more _hassle-free_ to just accept that the 
initial branch is called "master"?

Hth,
Dscho

```

## Anatoly Yakovenko, 2008-02-19 18:19

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191019j48a1ceadk4887ffc35100ab0a@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191019j48a1ceadk4887ffc35100ab0a%40mail.gmail.com
In-Reply-To: <alpine.LSU.1.00.0802191115440.30505@racer.site>

```
> > $ git-pull
> > fatal: 'origin': unable to chdir or not a git archive
> > fatal: The remote end hung up unexpectedly
>
> Since you did not clone from anywhere, the remote "origin" is not set.
> You will have to do that yourself:
>
>         git remote add -f origin http://aeyakovenko@myserver.com/git/repo/

Thanks, that worked.  but push still gives me an error:

$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.  Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:

    branch.master.remote = <nickname>
    branch.master.merge = <remote-ref>
    remote.<nickname>.url = <url>
    remote.<nickname>.fetch = <refspec>

See git-config(1) for details

>
> > $ git-clone http://aeyakovenko@myserver.com/git/repo/ foobar
> > Initialized empty Git repository in /home/aeyakovenko/projects/foobar/.git/
> > cat: /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin/master:
> > No such file or directory
> > /usr/bin/git-clone: line 450: cd:
> > /home/aeyakovenko/projects/foobar/.git/refs/remotes/origin: No such
> > file or directory
> > fatal: : not a valid SHA1
> > fatal: Not a valid object name HEAD
>
> That smells like another "master"-less repository.  Why do people do that?
> Isn't it just _easier_ and more _hassle-free_ to just accept that the
> initial branch is called "master"?

what do you mean by master-less?  I would love to just be able to
create a normal git repo with "git-init" and clone it over http the
same way that i do over ssh and the filesystem.  but when I do that
over http i get this error:

$ git-clone http://aeyakovenko@myserver.com/git/repo/ repo
Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

and running `git-update-server-info` does nothing.

```

## Jon Loeliger, 2008-02-19 18:24

Subject: Re: cant get git to work over http
Message-ID: <47BB1EC0.601@freescale.com>
URL: https://gitlist.dev/e/47BB1EC0.601%40freescale.com
In-Reply-To: <e26d18e40802191019j48a1ceadk4887ffc35100ab0a@mail.gmail.com>

```
Anatoly Yakovenko wrote:
>>> $ git-pull
>>> fatal: 'origin': unable to chdir or not a git archive
>>> fatal: The remote end hung up unexpectedly
>> Since you did not clone from anywhere, the remote "origin" is not set.
>> You will have to do that yourself:
>>
>>         git remote add -f origin http://aeyakovenko@myserver.com/git/repo/
> 
> Thanks, that worked.  but push still gives me an error:
> 
> $ git pull
> You asked me to pull without telling me which branch you
> want to merge with, and 'branch.master.merge' in
> your configuration file does not tell me either.  Please
> name which branch you want to merge on the command line and
> try again (e.g. 'git pull <repository> <refspec>').
> See git-pull(1) for details on the refspec.
> 
> If you often merge with the same branch, you may want to
> configure the following variables in your configuration
> file:
> 
>     branch.master.remote = <nickname>
>     branch.master.merge = <remote-ref>
>     remote.<nickname>.url = <url>
>     remote.<nickname>.fetch = <refspec>
> 
> See git-config(1) for details

Did you follow this advice?  You've set up the
origin's URL now, and so it knows from where the
fetch step will happen, but have you set up the
merge step yet?  Does it know what branches to
merge on that pull request?

jdl

```

## Anatoly Yakovenko, 2008-02-19 19:06

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191106v51c907bdn6aa51acef5f530a3@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191106v51c907bdn6aa51acef5f530a3%40mail.gmail.com
In-Reply-To: <47BB1EC0.601@freescale.com>

```
> > If you often merge with the same branch, you may want to
> > configure the following variables in your configuration
> > file:
> >
> >     branch.master.remote = <nickname>
> >     branch.master.merge = <remote-ref>
> >     remote.<nickname>.url = <url>
> >     remote.<nickname>.fetch = <refspec>
> >
> > See git-config(1) for details
>
> Did you follow this advice?  You've set up the
> origin's URL now, and so it knows from where the
> fetch step will happen, but have you set up the
> merge step yet?  Does it know what branches to
> merge on that pull request?

i dont understand what these values should be.
http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
 doesn't mention anything about configuring them.  So why cant i have
git working the same way over http as it does over ssh and the
filesystem?

```

## Johannes Schindelin, 2008-02-19 19:19

Subject: Re: cant get git to work over http
Message-ID: <alpine.LSU.1.00.0802191916020.7797@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802191916020.7797%40racer.site
In-Reply-To: <e26d18e40802191106v51c907bdn6aa51acef5f530a3@mail.gmail.com>

```
Hi,

On Tue, 19 Feb 2008, Anatoly Yakovenko wrote:

> > > If you often merge with the same branch, you may want to
> > > configure the following variables in your configuration
> > > file:
> > >
> > >     branch.master.remote = <nickname>
> > >     branch.master.merge = <remote-ref>
> > >     remote.<nickname>.url = <url>
> > >     remote.<nickname>.fetch = <refspec>
> > >
> > > See git-config(1) for details
> >
> > Did you follow this advice?  You've set up the
> > origin's URL now, and so it knows from where the
> > fetch step will happen, but have you set up the
> > merge step yet?  Does it know what branches to
> > merge on that pull request?
> 
> i dont understand what these values should be. 
> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
>  doesn't mention anything about configuring them.  So why cant i have 
> git working the same way over http as it does over ssh and the 
> filesystem?

You can.  But please understand that there is a difference from having 
cloned from somewhere, or setting up an uncloned repository.

You are experiencing that it is not all that easy to set up tracking 
information when your local branch is the original, and the remote was 
initialised with your local branch.

So the documentation you quoted does not help.  You are supposed to know 
enough about git details, such as where to find out what the 
branch.*.remote and branch.*.merge settings mean, before reading 
setup-git-server-over-http.txt.

Ciao,
Dscho

```

## Anatoly Yakovenko, 2008-02-19 19:27

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191127v7cc9f051l7002b56b41dc9f86@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191127v7cc9f051l7002b56b41dc9f86%40mail.gmail.com
In-Reply-To: <alpine.LSU.1.00.0802191916020.7797@racer.site>

```
> You can.  But please understand that there is a difference from having
> cloned from somewhere, or setting up an uncloned repository.

ok, so how do i set up an empty git repository over http, like i would
over ssh of the fs?

```

## Johannes Schindelin, 2008-02-19 19:41

Subject: Re: cant get git to work over http
Message-ID: <alpine.LSU.1.00.0802191940260.7826@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802191940260.7826%40racer.site
In-Reply-To: <e26d18e40802191127v7cc9f051l7002b56b41dc9f86@mail.gmail.com>

```
Hi,

On Tue, 19 Feb 2008, Anatoly Yakovenko wrote:

> > You can.  But please understand that there is a difference from having 
> > cloned from somewhere, or setting up an uncloned repository.
> 
> ok, so how do i set up an empty git repository over http, like i would 
> over ssh of the fs?

You set up the git repsitory via http, so where is the problem?

If you don't know how to set up the tracking information, why not just 
reclone?

Alternatively, you can read up on how to set up that information in the 
user manual.

Hth,
Dscho

```

## Anatoly Yakovenko, 2008-02-19 19:53

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191153w691ac5fcl3fa972ca6503b9fb%40mail.gmail.com
In-Reply-To: <alpine.LSU.1.00.0802191940260.7826@racer.site>

```
> You set up the git repsitory via http, so where is the problem?

 ok, i created a directory on my server.  Dav is on and working, i can
send and download files using IE on that url.

So is it possible for me to just simply run "git-init" in that
directory, and treat that url as i would a repo over ssh or the fs?

i can do this:

$ git-clone /var/www/localhost/htdocs/git/repo/ repo
Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
1 block

and i can do this:

$ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
Initialized empty Git repository in /home/aeyakovenko/projects/repo/repo/.git/
aeyakovenko@localhost's password:
Receiving objects: 100% (3/3), done.
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)

but for the life of me i cant do this:

$ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

```

## Johannes Schindelin, 2008-02-19 19:57

Subject: Re: cant get git to work over http
Message-ID: <alpine.LSU.1.00.0802191956420.7826@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802191956420.7826%40racer.site
In-Reply-To: <e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com>

```
Hi,

On Tue, 19 Feb 2008, Anatoly Yakovenko wrote:

> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?

Maybe run "git update-server-info" in that directory?

Hth,
Dscho

```

## Jeff King, 2008-02-19 19:57

Subject: Re: cant get git to work over http
Message-ID: <20080219195745.GB5427@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20080219195745.GB5427%40coredump.intra.peff.net
In-Reply-To: <e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com>

```
On Tue, Feb 19, 2008 at 11:53:58AM -0800, Anatoly Yakovenko wrote:

> but for the life of me i cant do this:
> 
> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?

Is your webserver exporting "/"? Or should it be
"http://aeyakovenko@localhost/git/repo"? If the path is correct, did you
run git-update-server-info in the repository you are trying to clone?

-Peff

```

## Jon Loeliger, 2008-02-19 20:05

Subject: Re: cant get git to work over http
Message-ID: <47BB3691.9040809@freescale.com>
URL: https://gitlist.dev/e/47BB3691.9040809%40freescale.com
In-Reply-To: <e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com>

```
Anatoly Yakovenko wrote:
>
> $ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/repo/repo/.git/
> aeyakovenko@localhost's password:
> Receiving objects: 100% (3/3), done.
> remote: Counting objects: 3, done.
> remote: Total 3 (delta 0), reused 0 (delta 0)
> 
> but for the life of me i cant do this:
> 
> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?

Ponder the Doc Root for an HTTP request.  Remember that your httpd
will likely be striping or rewriting that base directory path and
so it won't be needed on your git http:// requests.

Since my repository was outside of the basic Doc Root, and I wanted
to present similar path names to both git: and http: protocols, I
ended up rewriting some URL paths.  Also, if you have some form of
virtual hosting going on, you might need to do a virtualization
rewriting using --interpolated-path=pathtemplate.

HTH,
jdl

```

## Anatoly Yakovenko, 2008-02-19 21:05

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191305y5f7b8fdfr3113c84612c53189@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191305y5f7b8fdfr3113c84612c53189%40mail.gmail.com
In-Reply-To: <47BB3691.9040809@freescale.com>

```
> > but for the life of me i cant do this:
> >
> > $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ repo
> > Initialized empty Git repository in /home/aeyakovenko/projects/repo/.git/
> > Cannot get remote repository information.
> > Perhaps git-update-server-info needs to be run there?
>
> Ponder the Doc Root for an HTTP request.  Remember that your httpd
> will likely be striping or rewriting that base directory path and
> so it won't be needed on your git http:// requests.
>
> Since my repository was outside of the basic Doc Root, and I wanted
> to present similar path names to both git: and http: protocols, I
> ended up rewriting some URL paths.  Also, if you have some form of
> virtual hosting going on, you might need to do a virtualization
> rewriting using --interpolated-path=pathtemplate.

so, basically i need to append a .git to the repository root?  I am
getting these http requests in the access log:

72.192.162.186 - aeyakovenko [19/Feb/2008:12:58:13 -0800] "GET
/var/www/localhost/htdocs/git/repo/info/refs HTTP/1.1" 404 313

/var/www/localhost/htdocs/git/repo/info/refs doesn't exist, although
this exists:

/var/www/localhost/htdocs/git/repo/.git/info/refs

So why doesn't the http protocol handle this?  I can access
http://localhost/git/repo/.git/info/refs  through the browser without
a problem.  Is there any way to configure http protocol to just treat
the repository the same way ssh and fs does?

Thanks,
Anatoly

```

## Jon Loeliger, 2008-02-19 21:55

Subject: Re: cant get git to work over http
Message-ID: <47BB5037.5090302@freescale.com>
URL: https://gitlist.dev/e/47BB5037.5090302%40freescale.com
In-Reply-To: <e26d18e40802191305y5f7b8fdfr3113c84612c53189@mail.gmail.com>

```
Anatoly Yakovenko wrote:

> so, basically i need to append a .git to the repository root?  I am
> getting these http requests in the access log:
> 
> 72.192.162.186 - aeyakovenko [19/Feb/2008:12:58:13 -0800] "GET
> /var/www/localhost/htdocs/git/repo/info/refs HTTP/1.1" 404 313
> 
> /var/www/localhost/htdocs/git/repo/info/refs doesn't exist, although
> this exists:
> 
> /var/www/localhost/htdocs/git/repo/.git/info/refs
> 

Something is fishy here.  Is your repository bare or not?

jdl

```

## Anatoly Yakovenko, 2008-02-19 21:59

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191359r4c435818n4ae7b357d452d51e@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191359r4c435818n4ae7b357d452d51e%40mail.gmail.com
In-Reply-To: <47BB5037.5090302@freescale.com>

```
> Something is fishy here.  Is your repository bare or not?

no, why does it need to be bare?

```

## Anatoly Yakovenko, 2008-02-19 22:13

Subject: Re: cant get git to work over http
Message-ID: <e26d18e40802191413w48fe4a71hd7895b09d15cb44e@mail.gmail.com>
URL: https://gitlist.dev/e/e26d18e40802191413w48fe4a71hd7895b09d15cb44e%40mail.gmail.com
In-Reply-To: <e26d18e40802191359r4c435818n4ae7b357d452d51e@mail.gmail.com>

```
On Feb 19, 2008 1:59 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:
> > Something is fishy here.  Is your repository bare or not?
>
> no, why does it need to be bare?
>
so bare or not ssh works but http doesnt:

$ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/bare
bare-ssh
Initialized empty Git repository in /home/aeyakovenko/projects/bare-ssh/.git/
Receiving objects: 100% (3/3), done.
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)



and running over a bare directory doesn't work:


$ git-clone http://aeyakovenko@localhost/git/bare bare
Initialized empty Git repository in /home/aeyakovenko/projects/bare/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

apache acess log:

127.0.0.1 - - [19/Feb/2008:14:10:19 -0800] "GET /git/bare/info/refs
HTTP/1.1" 401 460

i feel like i am taking crazy pills, why is apache looking for
/git/bare/info/refs, and no the directory from the doc root?

```

## Johannes Schindelin, 2008-02-19 22:20

Subject: Re: cant get git to work over http
Message-ID: <alpine.LSU.1.00.0802192217250.7826@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802192217250.7826%40racer.site
In-Reply-To: <e26d18e40802191413w48fe4a71hd7895b09d15cb44e@mail.gmail.com>

```
Hi,

On Tue, 19 Feb 2008, Anatoly Yakovenko wrote:

> On Feb 19, 2008 1:59 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:
> > > Something is fishy here.  Is your repository bare or not?
> >
> > no, why does it need to be bare?
> >
> so bare or not ssh works but http doesnt:

Having a non-bare repository on a web server does not make sense at all.  
It's not like you will be developing in there, right?

And yes, you can append "/.git/" to your URL and it should work fine.  
HTTP transport is a second class citizen, and will probably never be as 
efficient as GIT transport.

Therefore, you can choose to continue your efforts with the http:// URL, 
but are mostly on your own, or you can go with ssh (git://) and it just 
works.

Unfortunately, I do not have the time to help you more.

Ciao,
Dscho

```

## Robert Haines, 2008-02-20 10:39

Subject: Re: cant get git to work over http
Message-ID: <D5916873-1703-41A2-BDE8-97B3D9038194@manchester.ac.uk>
URL: https://gitlist.dev/e/D5916873-1703-41A2-BDE8-97B3D9038194%40manchester.ac.uk
In-Reply-To: <e26d18e40802191153w691ac5fcl3fa972ca6503b9fb@mail.gmail.com>

```
> i can do this:
>
> $ git-clone /var/www/localhost/htdocs/git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/ 
> repo/.git/
> 1 block
>
> and i can do this:
>
> $ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/ 
> git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/repo/ 
> repo/.git/
> aeyakovenko@localhost's password:
> Receiving objects: 100% (3/3), done.
> remote: Counting objects: 3, done.
> remote: Total 3 (delta 0), reused 0 (delta 0)
>
> but for the life of me i cant do this:
>
> $ git-clone http://aeyakovenko@localhost/var/www/localhost/htdocs/ 
> git/repo/ repo
> Initialized empty Git repository in /home/aeyakovenko/projects/ 
> repo/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?

What is the document root set to on your web server? It shouldn't be  
'/'! When doing git over ssh you need the whole path, but when over  
http you just need the path from the document root...

So I would expect that your http clone should be:
$ git-clone http://aeyakovenko@localhost/git/repo/ repo

What happens when you point a web browser at either http:// 
aeyakovenko@localhost/var/www/localhost/htdocs/git/repo/ or http:// 
aeyakovenko@localhost/git/repo/ ?

Cheers,
Rob

```

## Anton Gladkov, 2008-02-20 13:46

Subject: Re: cant get git to work over http
Message-ID: <20080220134633.GA4220@atn.sw.ru>
URL: https://gitlist.dev/e/20080220134633.GA4220%40atn.sw.ru
In-Reply-To: <e26d18e40802191413w48fe4a71hd7895b09d15cb44e@mail.gmail.com>

```
On Tue, Feb 19, 2008 at 02:13:30PM -0800, Anatoly Yakovenko wrote:
> On Feb 19, 2008 1:59 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:
> > > Something is fishy here.  Is your repository bare or not?
> >
> > no, why does it need to be bare?
> >
> so bare or not ssh works but http doesnt:
> 
> $ git-clone ssh://aeyakovenko@localhost/var/www/localhost/htdocs/git/bare
> bare-ssh
> Initialized empty Git repository in /home/aeyakovenko/projects/bare-ssh/.git/
> Receiving objects: 100% (3/3), done.
> remote: Counting objects: 3, done.
> remote: Total 3 (delta 0), reused 0 (delta 0)
> 
> 
> 
> and running over a bare directory doesn't work:
> 
> 
> $ git-clone http://aeyakovenko@localhost/git/bare bare

'Bare' means cloning with '--bare' option.

> Initialized empty Git repository in /home/aeyakovenko/projects/bare/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?
> 
> apache acess log:
> 
> 127.0.0.1 - - [19/Feb/2008:14:10:19 -0800] "GET /git/bare/info/refs
> HTTP/1.1" 401 460
> 
> i feel like i am taking crazy pills, why is apache looking for
> /git/bare/info/refs, and no the directory from the doc root?
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Best regards,
		anton
mailto:agladkov@sw.ru

```
