Re: [git-users] httpd backend - repo not found.

2018-08-21 Thread Konstantin Khomoutov
On Tue, Aug 21, 2018 at 12:04:20AM -0400, CrestChristopher wrote:

> > > > Okay, the way Git works via HTTP is actually documented in [1],
> > > > and trust me, you're supposed to read it several times to understand
> > > > completely.
> > > Documented in [1] ?
> > Exactly. The numbered reference was at the mail's bottom, as usually.
> Sorry I don't follow ?

Maybe we're talking over each other's head ;-)

Here is a link to my message we're discussing:
.

If you squint at it, you'll notice it refers to a link which is then
presented at the message's bottom using the number 1 used for reference.

Is this what you're asking about? Or is it something else completely?


I guess you may get fooled a bit with the way Google Groups work.
They present you with a (rather clumsy, IMO) web interface which allows
you to compose HTML-formatted mails with embedded links, which you can
create right there in the message editor provided by that interface.
But at the same time, each group available on Google Groups is in fact a
plain "mailing list" (see 
),
with the web interface being merely an interactive "gateway" allowing
people to post messages and read them.

Still, many "old-school" people, me included, use groups available via
Google Groups no different than other mailing lists - by receiving
messages posted there in their mail inboxes and reading/writing them
using their mail client (think of Thunderbird, Outlook etc).

"Old-schoolers" typically despise HTML-formatted mails, and consider
them being plain text, so they format them as such.  With this style,
links to external material are usually provided at the message's bottom
to not clutter the text, and are numbered. Where you want to refer to
one of those links, you insert its number.

Did I guess right?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] httpd backend - repo not found.

2018-08-20 Thread CrestChristopher

Sorry I don't follow ?


On 8/20/2018 9:08 AM, Konstantin Khomoutov wrote:

On Mon, Aug 20, 2018 at 07:24:12AM -0400, CrestChristopher wrote:


Okay, the way Git works via HTTP is actually documented in [1],
and trust me, you're supposed to read it several times to understand
completely.

Documented in [1] ?

Exactly. The numbered reference was at the mail's bottom, as usually.



--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] httpd backend - repo not found.

2018-08-20 Thread Konstantin Khomoutov
On Mon, Aug 20, 2018 at 07:24:12AM -0400, CrestChristopher wrote:

>> Okay, the way Git works via HTTP is actually documented in [1],
>> and trust me, you're supposed to read it several times to understand
>> completely.
> 
> Documented in [1] ?

Exactly. The numbered reference was at the mail's bottom, as usually.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] httpd backend - repo not found.

2018-08-20 Thread CrestChristopher

Okay, the way Git works via HTTP is actually documented in [1],
and trust me, you're supposed to read it several times to understand
completely. 


Documented in [1] ?

Crest

--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] httpd backend - repo not found.

2018-08-16 Thread christian . tremel
i fiddled around with it a few more hours and came to the conclusion that 
this is hopeless. i decided to switch to gerrit codereview.

On Tuesday, August 14, 2018 at 7:32:28 PM UTC+2, Konstantin Khomoutov wrote:
>
> On Tue, Aug 14, 2018 at 02:24:30AM -0700, christia...@itsv.at 
>  wrote: 
>
> > i am trying to set up gitweb and the http backend. gitweb works so far, 
> but 
> > the http backend is giving me headaches. i always get "fatal: repository 
>   
> > not found  errors, which is quite frustrating as gitweb works perfectly 
> > well with the same url. i wasted hours on this, so any help would be 
> really 
> > nice! 
>
> Setting this stuff right might indeed be tricky. 
>
> I would highly recommend you to first disable mod_rewrite altogether and 
> try to get it working without it. The reason is that in my personal 
> experience (with web developers) using mod_rewrite is their first and 
> often the sole tactic in trying to solve any issue of mapping URLs to 
> the filesystem, and unfortunately, mod_rewrite is another moving part in 
> the already complicated gizmo, and the way it moves is not obvious. 
>
> Okay, the way Git works via HTTP is actually documented in [1], 
> and trust me, you're supposed to read it several times to understand 
> completely. 
>
> One of the major takeaways from it is that base part of your "Git" URL 
> must be mapped to the filesystem pathname of the `git-http-backend` 
> binary installed in your system. IOW, if you cant, say, your repos to be 
> located via, say, "http://test.sozvers.at/git/...; URLs, the base path 
> "/git/" (notice the trailing slash!) on the vhost serving 
> "test.sozvers.at" must map exactly to something like 
> "/usr/lib/git-core/git-http-backend/" (notice the trailing slash, 
> again!). The pathname shown is okay for Git packaged for Debian (and its 
> derivatives; check the package provided by your OS) to find out where 
> the git-http-backend binary is located on your system. 
>
> A typical way to map base pathnames from URLs to the git-http-backend 
> binary is through the ScriptAlias directive, like in 
>
> Here is a skeleton example of a vhost serving both Git and Gitweb: 
>
>  
> ServerName  git.domain.local 
> ServerAlias git 
>
> ServerAdmin webmaster@domain.local 
>
> DocumentRoot /var/www/git 
>
>  
> Require all denied 
> AllowOverride none 
> Options none 
>  
>
>  
> Options +FollowSymLinks +ExecCGI 
> AddHandler cgi-script .cgi 
>  
>
> ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ 
>  
>
>
> To make it fully working, you'd have to set up the GIT_PROJECT_ROOT 
> environment variable in your vhost config for Git to be able to find 
> the repositories. See [1] for more info. 
>
>
> After having the basic stipped down setup working, you may add 
> proper  directives to tighten access controls, if needed. 
>
>
> One another possible caveat is that if you're using mod_suexec to make 
> Git repos be served using the credentials of a dedicated user - 
> different from that of the web server process is using - stuff gets more 
> complicated as mod_suexec strips all the environment variables set in 
> the vhost config. If you have this situation, ask away as I have a 
> workaround. 
>
> 1. 
> https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-http-backend.html
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] httpd backend - repo not found.

2018-08-14 Thread Konstantin Khomoutov
On Tue, Aug 14, 2018 at 02:24:30AM -0700, christian.tre...@itsv.at wrote:

> i am trying to set up gitweb and the http backend. gitweb works so far, but 
> the http backend is giving me headaches. i always get "fatal: repository  
> not found  errors, which is quite frustrating as gitweb works perfectly 
> well with the same url. i wasted hours on this, so any help would be really 
> nice!

Setting this stuff right might indeed be tricky.

I would highly recommend you to first disable mod_rewrite altogether and
try to get it working without it. The reason is that in my personal
experience (with web developers) using mod_rewrite is their first and
often the sole tactic in trying to solve any issue of mapping URLs to
the filesystem, and unfortunately, mod_rewrite is another moving part in
the already complicated gizmo, and the way it moves is not obvious.

Okay, the way Git works via HTTP is actually documented in [1],
and trust me, you're supposed to read it several times to understand
completely.

One of the major takeaways from it is that base part of your "Git" URL
must be mapped to the filesystem pathname of the `git-http-backend`
binary installed in your system. IOW, if you cant, say, your repos to be
located via, say, "http://test.sozvers.at/git/...; URLs, the base path
"/git/" (notice the trailing slash!) on the vhost serving
"test.sozvers.at" must map exactly to something like
"/usr/lib/git-core/git-http-backend/" (notice the trailing slash,
again!). The pathname shown is okay for Git packaged for Debian (and its
derivatives; check the package provided by your OS) to find out where
the git-http-backend binary is located on your system.

A typical way to map base pathnames from URLs to the git-http-backend
binary is through the ScriptAlias directive, like in

Here is a skeleton example of a vhost serving both Git and Gitweb:


ServerName  git.domain.local
ServerAlias git

ServerAdmin webmaster@domain.local

DocumentRoot /var/www/git


Require all denied
AllowOverride none
Options none



Options +FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi


ScriptAlias /git/ /usr/lib/git-core/git-http-backend/



To make it fully working, you'd have to set up the GIT_PROJECT_ROOT
environment variable in your vhost config for Git to be able to find
the repositories. See [1] for more info.


After having the basic stipped down setup working, you may add
proper  directives to tighten access controls, if needed.


One another possible caveat is that if you're using mod_suexec to make
Git repos be served using the credentials of a dedicated user -
different from that of the web server process is using - stuff gets more
complicated as mod_suexec strips all the environment variables set in
the vhost config. If you have this situation, ask away as I have a
workaround.

1. 
https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-http-backend.html

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.