Re: [gitolite] https (or apache) access bypasses gitolite-shell; update fails

160 views
Skip to first unread message

Miklos Espak

unread,
May 5, 2012, 8:02:00 AM5/5/12
to Sitaram Chamarty, gito...@googlegroups.com
Good point, actually, I have not tried to push through http, just now that you asked. The cloning worked. When I try to push, I get this error:

fatal: git-push is not available for http/https repository when not compiled with USE_CURL_MULTI
fatal: git-http-push failed

Anyway, this error I can interpret at least, and there are some google hits with straightforward solution. I will try to rebuild git to see if I will get the same error as with https or not.

Does anybody have experience with gitolite v3 and apache and RW repositories?

Thanks,
Miklos

On Sat, May 5, 2012 at 12:27 PM, Sitaram Chamarty <sita...@gmail.com> wrote:
Are you saying that using a http URL works but if you change 'http' to
'https' it doesn't?

If so, I don't know enough about Apache to figure that out, although
there are folks on the list who are much much better than I am and can
probably tell you immediately what you need to do.  Just wait for
someone to answer...

Also, your subject line is kinda sorta misleading; I first thought you
wanted to know "how do I bypass gitolite when accessing it via https"
or something.

A better subject line would be "https access bypasses gitolite-shell;
update fails"

On Sat, May 5, 2012 at 4:00 PM, Miklos Espak <esp...@gmail.com> wrote:
> Hi,
>
> I have set up gitolite v3, it works well through git, http and ssh. I can
> also clone through https, but if I push, I get the following "classic"
> error:
>
> espakm@zawinul:~/tmp/git/e$ git push origin master
> remote: Empty compile time value given to use lib at hooks/update line 6
> remote: Use of uninitialized value in require at hooks/update line 7.
> remote: Use of uninitialized value in require at hooks/update line 7.
> remote: Can't locate Gitolite/Hooks/Update.pm in @INC (@INC contains:
>  /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
> /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
> /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at
> hooks/update line 7.
> remote: BEGIN failed--compilation aborted at hooks/update line 7.
> remote: error: hook declined to update refs/heads/master
> To https://me:********@cmicdev.cs.ucl.ac.uk/git/NiftyGuide.git
> ! [remote rejected] master -> master (hook declined)
> error: failed to push some refs to
> 'https://me:******@cmicdev.cs.ucl.ac.uk/git/NiftyGuide.git'
>
> I read the documentation about this error, but it's related to ssh that
> works fine here.
>
> I ran git update-server-info in the repository.
>
> The Apache2 httpd.conf has this:
>
> ----------------------------------
> SetEnv GIT_PROJECT_ROOT /data/gitolite/repositories
> SetEnv GIT_HTTP_EXPORT_ALL
>
> ScriptAliasMatch \
>        "(?x)^/git/(.*/(HEAD | \
>                        info/refs | \
>                        objects/(info/[^/]+ | \
>                                 [0-9a-f]{2}/[0-9a-f]{38} | \
>                                 pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
>                        git-(upload|receive)-pack))$" \
>          /usr/libexec/git-core/git-http-backend/$1
>
> <LocationMatch "^/git/.*/git-receive-pack$">
>      AuthType Basic
>      AuthName "git"
>      AuthUserFile "/paramedic/cmicdev/data/apache/access/cmic.htpasswd"
>      Require valid-user
> </LocationMatch>
> ----------------------
>
> The update hook of the project links to that of gitolite:
>
> [root@cmicdev conf]# ls -l
> /data/gitolite/repositories/NiftyGuide.git/hooks/update
> lrwxrwxrwx 1 git apache 45 May  1 12:42
> /data/gitolite/repositories/NiftyGuide.git/hooks/update ->
> /data/gitolite//.gitolite/hooks/common/update
>
> I have no idea what else to check.
>
> Could someone help me please?
>
> Thank you,
> Miklos
>
>



--
Sitaram

Miklos Espak

unread,
May 5, 2012, 8:08:31 AM5/5/12
to Sitaram Chamarty, gito...@googlegroups.com
Or, if I'm lucky, solving the curl problem will solve the https problem as well.

Sitaram Chamarty

unread,
May 5, 2012, 8:24:42 AM5/5/12
to Miklos Espak, gito...@googlegroups.com
this seems very inconsistent to me:

On Sat, May 5, 2012 at 5:32 PM, Miklos Espak <esp...@gmail.com> wrote:

> fatal: git-push is not available for http/https repository when not compiled
> with USE_CURL_MULTI
> fatal: git-http-push failed

and

>> > error: failed to push some refs to
>> > 'https://me:******@cmicdev.cs.ucl.ac.uk/git/NiftyGuide.git'

How would you get this far if git push is not even available for http/s repo?

Anyway as I said I hope someone with more apache smarts will help you;
I barely know enough to make it work on stock Fedora and run the smoke
test!

Miklos Espak

unread,
May 5, 2012, 8:53:19 AM5/5/12
to Sitaram Chamarty, gito...@googlegroups.com
I think that the difference is somewhere in the cgi script that makes this smart http thing.
Maybe it handles http and https differently. But I really don't know these things either.

I double checked the apache settings, but haven't found anything.

Miklos

Miklos Espak

unread,
May 5, 2012, 10:50:50 AM5/5/12
to Sitaram Chamarty, gito...@googlegroups.com
I tried to push through http from a computer were the git client was built with an up-to-date version of curl. The result was the same as through https. (It seems, the curl is needed only through http, not through https.)

So, I cannot push through Apache in general.

Any idea?

Thank you,
Miklos

Reply all
Reply to author
Forward
0 new messages