git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cant get git to work over http
@ 2008-02-19  0:49 Anatoly Yakovenko
  2008-02-19  6:39 ` Mike Hommey
  0 siblings, 1 reply; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19  0:49 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19  0:49 cant get git to work over http Anatoly Yakovenko
@ 2008-02-19  6:39 ` Mike Hommey
  2008-02-19  7:09   ` Anatoly Yakovenko
  0 siblings, 1 reply; 22+ messages in thread
From: Mike Hommey @ 2008-02-19  6:39 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19  6:39 ` Mike Hommey
@ 2008-02-19  7:09   ` Anatoly Yakovenko
  2008-02-19  9:39     ` Mike Hommey
  2008-02-19 11:18     ` Johannes Schindelin
  0 siblings, 2 replies; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19  7:09 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git

> > *.*.*.*- 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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19  7:09   ` Anatoly Yakovenko
@ 2008-02-19  9:39     ` Mike Hommey
  2008-02-19 11:18     ` Johannes Schindelin
  1 sibling, 0 replies; 22+ messages in thread
From: Mike Hommey @ 2008-02-19  9:39 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19  7:09   ` Anatoly Yakovenko
  2008-02-19  9:39     ` Mike Hommey
@ 2008-02-19 11:18     ` Johannes Schindelin
  2008-02-19 18:19       ` Anatoly Yakovenko
  1 sibling, 1 reply; 22+ messages in thread
From: Johannes Schindelin @ 2008-02-19 11:18 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 11:18     ` Johannes Schindelin
@ 2008-02-19 18:19       ` Anatoly Yakovenko
  2008-02-19 18:24         ` Jon Loeliger
  0 siblings, 1 reply; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 18:19 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Mike Hommey, git

> > $ 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.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 18:19       ` Anatoly Yakovenko
@ 2008-02-19 18:24         ` Jon Loeliger
  2008-02-19 19:06           ` Anatoly Yakovenko
  0 siblings, 1 reply; 22+ messages in thread
From: Jon Loeliger @ 2008-02-19 18:24 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Johannes Schindelin, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 18:24         ` Jon Loeliger
@ 2008-02-19 19:06           ` Anatoly Yakovenko
  2008-02-19 19:19             ` Johannes Schindelin
  0 siblings, 1 reply; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 19:06 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: Johannes Schindelin, Mike Hommey, git

> > 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?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:06           ` Anatoly Yakovenko
@ 2008-02-19 19:19             ` Johannes Schindelin
  2008-02-19 19:27               ` Anatoly Yakovenko
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Schindelin @ 2008-02-19 19:19 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Jon Loeliger, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:19             ` Johannes Schindelin
@ 2008-02-19 19:27               ` Anatoly Yakovenko
  2008-02-19 19:41                 ` Johannes Schindelin
  0 siblings, 1 reply; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 19:27 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Jon Loeliger, Mike Hommey, git

> 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?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:27               ` Anatoly Yakovenko
@ 2008-02-19 19:41                 ` Johannes Schindelin
  2008-02-19 19:53                   ` Anatoly Yakovenko
  0 siblings, 1 reply; 22+ messages in thread
From: Johannes Schindelin @ 2008-02-19 19:41 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Jon Loeliger, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:41                 ` Johannes Schindelin
@ 2008-02-19 19:53                   ` Anatoly Yakovenko
  2008-02-19 19:57                     ` Johannes Schindelin
                                       ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 19:53 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Jon Loeliger, Mike Hommey, git

> 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?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:53                   ` Anatoly Yakovenko
@ 2008-02-19 19:57                     ` Johannes Schindelin
  2008-02-19 19:57                     ` Jeff King
                                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 22+ messages in thread
From: Johannes Schindelin @ 2008-02-19 19:57 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Jon Loeliger, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:53                   ` Anatoly Yakovenko
  2008-02-19 19:57                     ` Johannes Schindelin
@ 2008-02-19 19:57                     ` Jeff King
  2008-02-19 20:05                     ` Jon Loeliger
  2008-02-20 10:39                     ` Robert Haines
  3 siblings, 0 replies; 22+ messages in thread
From: Jeff King @ 2008-02-19 19:57 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Johannes Schindelin, Jon Loeliger, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:53                   ` Anatoly Yakovenko
  2008-02-19 19:57                     ` Johannes Schindelin
  2008-02-19 19:57                     ` Jeff King
@ 2008-02-19 20:05                     ` Jon Loeliger
  2008-02-19 21:05                       ` Anatoly Yakovenko
  2008-02-20 10:39                     ` Robert Haines
  3 siblings, 1 reply; 22+ messages in thread
From: Jon Loeliger @ 2008-02-19 20:05 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Johannes Schindelin, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 20:05                     ` Jon Loeliger
@ 2008-02-19 21:05                       ` Anatoly Yakovenko
  2008-02-19 21:55                         ` Jon Loeliger
  0 siblings, 1 reply; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 21:05 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: Johannes Schindelin, Mike Hommey, git

> > 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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 21:05                       ` Anatoly Yakovenko
@ 2008-02-19 21:55                         ` Jon Loeliger
  2008-02-19 21:59                           ` Anatoly Yakovenko
  0 siblings, 1 reply; 22+ messages in thread
From: Jon Loeliger @ 2008-02-19 21:55 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Johannes Schindelin, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 21:55                         ` Jon Loeliger
@ 2008-02-19 21:59                           ` Anatoly Yakovenko
  2008-02-19 22:13                             ` Anatoly Yakovenko
  0 siblings, 1 reply; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 21:59 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: Johannes Schindelin, Mike Hommey, git

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

no, why does it need to be bare?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 21:59                           ` Anatoly Yakovenko
@ 2008-02-19 22:13                             ` Anatoly Yakovenko
  2008-02-19 22:20                               ` Johannes Schindelin
  2008-02-20 13:46                               ` Anton Gladkov
  0 siblings, 2 replies; 22+ messages in thread
From: Anatoly Yakovenko @ 2008-02-19 22:13 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: Johannes Schindelin, Mike Hommey, git

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?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 22:13                             ` Anatoly Yakovenko
@ 2008-02-19 22:20                               ` Johannes Schindelin
  2008-02-20 13:46                               ` Anton Gladkov
  1 sibling, 0 replies; 22+ messages in thread
From: Johannes Schindelin @ 2008-02-19 22:20 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Jon Loeliger, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 19:53                   ` Anatoly Yakovenko
                                       ` (2 preceding siblings ...)
  2008-02-19 20:05                     ` Jon Loeliger
@ 2008-02-20 10:39                     ` Robert Haines
  3 siblings, 0 replies; 22+ messages in thread
From: Robert Haines @ 2008-02-20 10:39 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Johannes Schindelin, Jon Loeliger, Mike Hommey, git

> 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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: cant get git to work over http
  2008-02-19 22:13                             ` Anatoly Yakovenko
  2008-02-19 22:20                               ` Johannes Schindelin
@ 2008-02-20 13:46                               ` Anton Gladkov
  1 sibling, 0 replies; 22+ messages in thread
From: Anton Gladkov @ 2008-02-20 13:46 UTC (permalink / raw)
  To: Anatoly Yakovenko; +Cc: Jon Loeliger, Johannes Schindelin, Mike Hommey, git

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-02-20 13:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19  0:49 cant get git to work over http Anatoly Yakovenko
2008-02-19  6:39 ` Mike Hommey
2008-02-19  7:09   ` Anatoly Yakovenko
2008-02-19  9:39     ` Mike Hommey
2008-02-19 11:18     ` Johannes Schindelin
2008-02-19 18:19       ` Anatoly Yakovenko
2008-02-19 18:24         ` Jon Loeliger
2008-02-19 19:06           ` Anatoly Yakovenko
2008-02-19 19:19             ` Johannes Schindelin
2008-02-19 19:27               ` Anatoly Yakovenko
2008-02-19 19:41                 ` Johannes Schindelin
2008-02-19 19:53                   ` Anatoly Yakovenko
2008-02-19 19:57                     ` Johannes Schindelin
2008-02-19 19:57                     ` Jeff King
2008-02-19 20:05                     ` Jon Loeliger
2008-02-19 21:05                       ` Anatoly Yakovenko
2008-02-19 21:55                         ` Jon Loeliger
2008-02-19 21:59                           ` Anatoly Yakovenko
2008-02-19 22:13                             ` Anatoly Yakovenko
2008-02-19 22:20                               ` Johannes Schindelin
2008-02-20 13:46                               ` Anton Gladkov
2008-02-20 10:39                     ` Robert Haines

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).