Cannot push to shared server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot push to shared server

gammaray
Hi,
I've installed mercurial on a shared host (bluehost) using these
instructions: http://gttools.com/bluehost-setup/mercurial-and-trac-setup-on-bluehost/

I can create repositories on the server from the shell, and I can even
clone them on my local machine.  I am not able to push changes back to
the server however.

Here is all the information I get:


eper@ubuntu:/host/temp/f/PROJECT$ hg --verbose push
http://****:****@thebeekeeper.net/hg/repos/PROJECT
Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
root, group root
Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
root, group root
real URL is http://thebeekeeper.net/hg/repos/PROJECT/
(falling back to static-http)
pushing to http://gamroth:***@thebeekeeper.net/hg/repos/PROJECT
abort: cannot lock static-http repository

I'm mostly sure that I followed the instructions correctly, but it
seems like there's something obvious I'm missing.

Thanks,
Nick
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

Matt Mackall
On Tue, 2010-04-27 at 21:49 -0500, Nick Gamroth wrote:
> Hi,
> I've installed mercurial on a shared host (bluehost) using these
> instructions: http://gttools.com/bluehost-setup/mercurial-and-trac-setup-on-bluehost/

We don't know anything about trac here.

> I can create repositories on the server from the shell, and I can even
> clone them on my local machine.  I am not able to push changes back to
> the server however.
>
> Here is all the information I get:
>
>
> eper@ubuntu:/host/temp/f/PROJECT$ hg --verbose push
> http://****:****@thebeekeeper.net/hg/repos/PROJECT
> Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
> root, group root
> Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
> root, group root
> real URL is http://thebeekeeper.net/hg/repos/PROJECT/
> (falling back to static-http)

Whatever's on the other end gave us an answer we weren't expecting when
we said hello. Check your server logs for errors. But pushing over plain
http is not advised.

--
http://selenic.com : development and support for Mercurial and Linux


_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

Dirkjan Ochtman
On Wed, Apr 28, 2010 at 06:24, Matt Mackall <[hidden email]> wrote:
> On Tue, 2010-04-27 at 21:49 -0500, Nick Gamroth wrote:
>> Hi,
>> I've installed mercurial on a shared host (bluehost) using these
>> instructions: http://gttools.com/bluehost-setup/mercurial-and-trac-setup-on-bluehost/
>
> We don't know anything about trac here.

I do know a thing or two. You aren't trying to push to Trac, right?
Because that doesn't work.

Cheers,

Dirkjan
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

gammaray
In reply to this post by Matt Mackall
On Tue, Apr 27, 2010 at 11:24 PM, Matt Mackall <[hidden email]> wrote:
> On Tue, 2010-04-27 at 21:49 -0500, Nick Gamroth wrote:
>> Hi,
>> I've installed mercurial on a shared host (bluehost) using these
>> instructions: http://gttools.com/bluehost-setup/mercurial-and-trac-setup-on-bluehost/
>
> We don't know anything about trac here.

Should have been more clear; I'm not worried about Trac at all.

>
>> I can create repositories on the server from the shell, and I can even
>> clone them on my local machine.  I am not able to push changes back to
>> the server however.
>>
>> Here is all the information I get:
>>
>>
>> eper@ubuntu:/host/temp/f/PROJECT$ hg --verbose push
>> http://****:****@thebeekeeper.net/hg/repos/PROJECT
>> Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
>> root, group root
>> Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
>> root, group root
>> real URL is http://thebeekeeper.net/hg/repos/PROJECT/
>> (falling back to static-http)
>
> Whatever's on the other end gave us an answer we weren't expecting when
> we said hello. Check your server logs for errors. But pushing over plain
> http is not advised.
>

Ok, here is my server log when I issue a hg push:
 - myusername [28/Apr/2010:08:03:30 -0600] "GET
/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 206 1410 "-"
"mercurial/proto-1.0"
 - - [28/Apr/2010:08:05:58 -0600] "GET
/hg/repos/CBOARD?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
HTTP/1.1" 401 467 "-" "mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:05:58 -0600] "GET
/hg/repos/CBOARD?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
HTTP/1.1" 301 934 "-" "mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:05:58 -0600] "GET
/hg/repos/CBOARD/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
HTTP/1.1" 200 749 "-" "mercurial/proto-1.0"
 - - [28/Apr/2010:08:05:59 -0600] "GET /hg/repos/CBOARD/.hg/requires
HTTP/1.1" 401 467 "-" "mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:05:59 -0600] "GET
/hg/repos/CBOARD/.hg/requires HTTP/1.1" 206 382 "-"
"mercurial/proto-1.0"
 - - [28/Apr/2010:08:05:59 -0600] "GET
/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 401 467 "-"
"mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:05:59 -0600] "GET
/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 206 3122 "-"
"mercurial/proto-1.0"
 - - [28/Apr/2010:08:05:59 -0600] "GET
/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 401 467 "-"
"mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:05:59 -0600] "GET
/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 206 1391 "-"
"mercurial/proto-1.0"

I don't really see any errors there.  I didn't know how to specify
plain http, but I thought doing
hg push https://***:***@thebeekeeper.net/hg/repos/CBOARD
might help.  I get the same error, and the log looks almost the same:

 - myusername [28/Apr/2010:08:06:45 -0600] "GET
/~thebeeke/hg/repos/CBOARD/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
HTTP/1.1" 200 842 "-" "mercurial/proto-1.0"
 - - [28/Apr/2010:08:06:45 -0600] "GET /hg/repos/CBOARD/.hg/requires
HTTP/1.1" 301 2515 "-" "mercurial/proto-1.0"
 - - [28/Apr/2010:08:06:45 -0600] "GET
/~thebeeke/hg/repos/CBOARD/.hg/requires HTTP/1.1" 401 5001 "-"
"mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:06:45 -0600] "GET
/~thebeeke/hg/repos/CBOARD/.hg/requires HTTP/1.1" 206 2452 "-"
"mercurial/proto-1.0"
 - - [28/Apr/2010:08:06:46 -0600] "GET
/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 301 521 "-"
"mercurial/proto-1.0"
 - - [28/Apr/2010:08:06:46 -0600] "GET
/~thebeeke/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 401 5033
"-" "mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:06:46 -0600] "GET
/~thebeeke/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 206 5204
"-" "mercurial/proto-1.0"
 - - [28/Apr/2010:08:06:46 -0600] "GET
/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 301 521 "-"
"mercurial/proto-1.0"
 - - [28/Apr/2010:08:06:46 -0600] "GET
/~thebeeke/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 401 5033
"-" "mercurial/proto-1.0"
 - myusername [28/Apr/2010:08:06:47 -0600] "GET
/~thebeeke/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 206 3476
"-" "mercurial/proto-1.0"

Nothing there sticks out to me as a problem.

Thanks for the help!
Nick



> --
> http://selenic.com : development and support for Mercurial and Linux
>
>
>



--
~+~+~+~+~+~+~
thebeekeeper.net
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

Benoit Boissinot
On Wed, Apr 28, 2010 at 4:18 PM, Nick Gamroth <[hidden email]> wrote:

> On Tue, Apr 27, 2010 at 11:24 PM, Matt Mackall <[hidden email]> wrote:
>> On Tue, 2010-04-27 at 21:49 -0500, Nick Gamroth wrote:
>>> Hi,
>>> I've installed mercurial on a shared host (bluehost) using these
>>> instructions: http://gttools.com/bluehost-setup/mercurial-and-trac-setup-on-bluehost/
>>
>> We don't know anything about trac here.
>
> Should have been more clear; I'm not worried about Trac at all.
>>
>>> I can create repositories on the server from the shell, and I can even
>>> clone them on my local machine.  I am not able to push changes back to
>>> the server however.

Since it seems it's using static-http, it is logical.

http://mercurial.selenic.com/wiki/StaticHTTP

cheers,

Benoit
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

gammaray
In reply to this post by gammaray
Well, disregard that last message.  It looks like I've got something
working, but not quite perfect.

I can clone from the server with:
 hg clone http://***:***@thebeekeeper.net/hg/repos/x
To push however, I have to use:
 hg push --verbose http://****:****@thebeekeeper.net/hg/hgwebdir.cgi/x

Seems to me like either my .htaccessor my hgweb.config is no good, .
I'm guessing .htaccess because when I try and look at the web
interface I have to put hgwebdir.cgi in the URL, but I don't think
that should be the case.

Anyways, I know this isn't an apache list, but I'll post my .htaccess
and maybe somebody can give me a hint:
Options +ExecCGI
RewriteEngine On
RewriteBase /home2/thebeeke/public_html/hg
RewriteRule ^/(.*) /hgwebdir.cgi/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) hgwebdir.cgi/$1 [QSA,L]
AuthUserFile /home2/thebeeke/etc/hg-basic-auth
AuthName "HG Repositories"
AuthType Basic
Require valid-user



On Wed, Apr 28, 2010 at 9:18 AM, Nick Gamroth <[hidden email]> wrote:

> On Tue, Apr 27, 2010 at 11:24 PM, Matt Mackall <[hidden email]> wrote:
>> On Tue, 2010-04-27 at 21:49 -0500, Nick Gamroth wrote:
>>> Hi,
>>> I've installed mercurial on a shared host (bluehost) using these
>>> instructions: http://gttools.com/bluehost-setup/mercurial-and-trac-setup-on-bluehost/
>>
>> We don't know anything about trac here.
>
> Should have been more clear; I'm not worried about Trac at all.
>>
>>> I can create repositories on the server from the shell, and I can even
>>> clone them on my local machine.  I am not able to push changes back to
>>> the server however.
>>>
>>> Here is all the information I get:
>>>
>>>
>>> eper@ubuntu:/host/temp/f/PROJECT$ hg --verbose push
>>> http://****:****@thebeekeeper.net/hg/repos/PROJECT
>>> Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
>>> root, group root
>>> Not trusting file /host/temp/f/PROJECT/.hg/hgrc from untrusted user
>>> root, group root
>>> real URL is http://thebeekeeper.net/hg/repos/PROJECT/
>>> (falling back to static-http)
>>
>> Whatever's on the other end gave us an answer we weren't expecting when
>> we said hello. Check your server logs for errors. But pushing over plain
>> http is not advised.
>>
>
> Ok, here is my server log when I issue a hg push:
>  - myusername [28/Apr/2010:08:03:30 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 206 1410 "-"
> "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:05:58 -0600] "GET
> /hg/repos/CBOARD?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
> HTTP/1.1" 401 467 "-" "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:05:58 -0600] "GET
> /hg/repos/CBOARD?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
> HTTP/1.1" 301 934 "-" "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:05:58 -0600] "GET
> /hg/repos/CBOARD/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
> HTTP/1.1" 200 749 "-" "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:05:59 -0600] "GET /hg/repos/CBOARD/.hg/requires
> HTTP/1.1" 401 467 "-" "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:05:59 -0600] "GET
> /hg/repos/CBOARD/.hg/requires HTTP/1.1" 206 382 "-"
> "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:05:59 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 401 467 "-"
> "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:05:59 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 206 3122 "-"
> "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:05:59 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 401 467 "-"
> "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:05:59 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 206 1391 "-"
> "mercurial/proto-1.0"
>
> I don't really see any errors there.  I didn't know how to specify
> plain http, but I thought doing
> hg push https://***:***@thebeekeeper.net/hg/repos/CBOARD
> might help.  I get the same error, and the log looks almost the same:
>
>  - myusername [28/Apr/2010:08:06:45 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between
> HTTP/1.1" 200 842 "-" "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:06:45 -0600] "GET /hg/repos/CBOARD/.hg/requires
> HTTP/1.1" 301 2515 "-" "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:06:45 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/.hg/requires HTTP/1.1" 401 5001 "-"
> "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:06:45 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/.hg/requires HTTP/1.1" 206 2452 "-"
> "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:06:46 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 301 521 "-"
> "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:06:46 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 401 5033
> "-" "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:06:46 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/.hg/store/00manifest.i HTTP/1.1" 206 5204
> "-" "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:06:46 -0600] "GET
> /hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 301 521 "-"
> "mercurial/proto-1.0"
>  - - [28/Apr/2010:08:06:46 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 401 5033
> "-" "mercurial/proto-1.0"
>  - myusername [28/Apr/2010:08:06:47 -0600] "GET
> /~thebeeke/hg/repos/CBOARD/.hg/store/00changelog.i HTTP/1.1" 206 3476
> "-" "mercurial/proto-1.0"
>
> Nothing there sticks out to me as a problem.
>
> Thanks for the help!
> Nick
>
>
>
>> --
>> http://selenic.com : development and support for Mercurial and Linux
>>
>>
>>
>
>
>
> --
> ~+~+~+~+~+~+~
> thebeekeeper.net
>



--
~+~+~+~+~+~+~
thebeekeeper.net
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

Paul Boddie-4
Nick Gamroth wrote:
> Well, disregard that last message.  It looks like I've got something
> working, but not quite perfect.
>
> I can clone from the server with:
>  hg clone http://***:***@thebeekeeper.net/hg/repos/x
>  

Have you put the repositories into your public_html directory or under
your "document root"? This isn't necessary if you're using hgwebdir.cgi
and is obviously going to cause confusion if you retrieve them directly
via Apache, mostly because you won't be able to push back to the same
place. Other confusion that people have experienced includes Apache
misbehaviour as it decides to serve things statically instead of via the
CGI script.

> To push however, I have to use:
>  hg push --verbose http://****:****@thebeekeeper.net/hg/hgwebdir.cgi/x
>  

Here, you're pushing via hgwebdir.cgi, which is what you would have to
do, anyway. But you actually should be pulling/cloning them via
hgwebdir.cgi, too.

> Seems to me like either my .htaccessor my hgweb.config is no good, .
> I'm guessing .htaccess because when I try and look at the web
> interface I have to put hgwebdir.cgi in the URL, but I don't think
> that should be the case.
>  

You need to specify hgwebdir.cgi unless Apache is configured to not
expose it in some way.

> Anyways, I know this isn't an apache list, but I'll post my .htaccess
> and maybe somebody can give me a hint:
> Options +ExecCGI
> RewriteEngine On
> RewriteBase /home2/thebeeke/public_html/hg
> RewriteRule ^/(.*) /hgwebdir.cgi/$1
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule (.*) hgwebdir.cgi/$1 [QSA,L]
> AuthUserFile /home2/thebeeke/etc/hg-basic-auth
> AuthName "HG Repositories"
> AuthType Basic
> Require valid-user
>  

Shouldn't RewriteBase only refer to URL paths, not filesystem paths? See
here for something which has worked for me in the past:

http://mercurial.selenic.com/wiki/PublishingRepositories#Using_an_.htaccess_File

My advice is this: if you have control over the server configuration,
use ScriptAlias directives to set the basics up. The mod_rewrite stuff
does appear to work, but it's very difficult to read and write.

Paul
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

gammaray
On Wed, Apr 28, 2010 at 10:51 AM, Paul Boddie <[hidden email]> wrote:

> Nick Gamroth wrote:
>>
>> Well, disregard that last message.  It looks like I've got something
>> working, but not quite perfect.
>>
>> I can clone from the server with:
>>  hg clone http://***:***@thebeekeeper.net/hg/repos/x
>>
>
> Have you put the repositories into your public_html directory or under your
> "document root"? This isn't necessary if you're using hgwebdir.cgi and is
> obviously going to cause confusion if you retrieve them directly via Apache,
> mostly because you won't be able to push back to the same place. Other
> confusion that people have experienced includes Apache misbehaviour as it
> decides to serve things statically instead of via the CGI script.
>

Makes sense.  I moved my repos directory out of the public_html tree
into my home directory.

>> To push however, I have to use:
>>  hg push --verbose http://****:****@thebeekeeper.net/hg/hgwebdir.cgi/x
>>
>
> Here, you're pushing via hgwebdir.cgi, which is what you would have to do,
> anyway. But you actually should be pulling/cloning them via hgwebdir.cgi,
> too.
>
>> Seems to me like either my .htaccessor my hgweb.config is no good, .
>> I'm guessing .htaccess because when I try and look at the web
>> interface I have to put hgwebdir.cgi in the URL, but I don't think
>> that should be the case.
>>
>
> You need to specify hgwebdir.cgi unless Apache is configured to not expose
> it in some way.
>
>> Anyways, I know this isn't an apache list, but I'll post my .htaccess
>> and maybe somebody can give me a hint:
>> Options +ExecCGI
>> RewriteEngine On
>> RewriteBase /home2/thebeeke/public_html/hg
>> RewriteRule ^/(.*) /hgwebdir.cgi/$1
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule (.*) hgwebdir.cgi/$1 [QSA,L]
>> AuthUserFile /home2/thebeeke/etc/hg-basic-auth
>> AuthName "HG Repositories"
>> AuthType Basic
>> Require valid-user
>>
>
> Shouldn't RewriteBase only refer to URL paths, not filesystem paths? See
> here for something which has worked for me in the past:
>
> http://mercurial.selenic.com/wiki/PublishingRepositories#Using_an_.htaccess_File

I used this advice and .htaccess seems to be working correctly.  In my
browser I can go to http://thebeekeeper.net/hg/ and get the mercurial
repositories view.  I can push to the server with
hg push http://****:****@thebeekeeper.net/hg/x

I can't clone from /hg/x however; I get a abort: HTTP Error 500:
Internal Server Error.  It seems like this isn't related to apache at
all, and I found
http://mercurial.selenic.com/wiki/PublishingRepositories#Troubleshooting
which looked like it would help, but its still not working after
setting the permissions.  It still seems like a permissions issue, but
I'm not sure where.  Everything in my ~/repos tree has read
permissions.

I took a look at my server logs, and tried each URL in my browser.
Everything succeeds except for

"GET /hg/x?bases=0000000000000000000000000000000000000000&cmd=changegroupsubset&heads=627caa389f544cd5ef6241525b5b1397bc6f59a1
HTTP/1.1" 500 738 "-" "mercurial/proto-1.0"

which gives me the 500 error

Nick


>
> My advice is this: if you have control over the server configuration, use
> ScriptAlias directives to set the basics up. The mod_rewrite stuff does
> appear to work, but it's very difficult to read and write.
>
> Paul
>



--
~+~+~+~+~+~+~
thebeekeeper.net
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

Paul Boddie-4
Nick Gamroth wrote:

> I used this advice and .htaccess seems to be working correctly.  In my
> browser I can go to http://thebeekeeper.net/hg/ and get the mercurial
> repositories view.  I can push to the server with
> hg push http://****:****@thebeekeeper.net/hg/x
>
> I can't clone from /hg/x however; I get a abort: HTTP Error 500:
> Internal Server Error.  It seems like this isn't related to apache at
> all, and I found
> http://mercurial.selenic.com/wiki/PublishingRepositories#Troubleshooting
> which looked like it would help, but its still not working after
> setting the permissions.  It still seems like a permissions issue, but
> I'm not sure where.  Everything in my ~/repos tree has read
> permissions.
>  

It's somewhat odd that you can push but not clone. After briefly looking
at the code, the only thing I can think of that might cause such a
problem is acquiring a lock on the repository, which presumably requires
write access to some directory, but I would have thought that locking
would be involved when you push, too.

> I took a look at my server logs, and tried each URL in my browser.
> Everything succeeds except for
>
> "GET /hg/x?bases=0000000000000000000000000000000000000000&cmd=changegroupsubset&heads=627caa389f544cd5ef6241525b5b1397bc6f59a1
> HTTP/1.1" 500 738 "-" "mercurial/proto-1.0"
>
> which gives me the 500 error
>  

Do you have access to the Apache error log?

Paul
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

gammaray
Fixed it!
Recorded below for posterity.

On Thu, Apr 29, 2010 at 6:13 AM, Paul Boddie <[hidden email]> wrote:

> Nick Gamroth wrote:
>>
>> I used this advice and .htaccess seems to be working correctly.  In my
>> browser I can go to http://thebeekeeper.net/hg/ and get the mercurial
>> repositories view.  I can push to the server with
>> hg push http://****:****@thebeekeeper.net/hg/x
>>
>> I can't clone from /hg/x however; I get a abort: HTTP Error 500:
>> Internal Server Error.  It seems like this isn't related to apache at
>> all, and I found
>> http://mercurial.selenic.com/wiki/PublishingRepositories#Troubleshooting
>> which looked like it would help, but its still not working after
>> setting the permissions.  It still seems like a permissions issue, but
>> I'm not sure where.  Everything in my ~/repos tree has read
>> permissions.
>>
>
> It's somewhat odd that you can push but not clone. After briefly looking at
> the code, the only thing I can think of that might cause such a problem is
> acquiring a lock on the repository, which presumably requires write access
> to some directory, but I would have thought that locking would be involved
> when you push, too.
>
>> I took a look at my server logs, and tried each URL in my browser.
>> Everything succeeds except for
>>
>> "GET
>> /hg/x?bases=0000000000000000000000000000000000000000&cmd=changegroupsubset&heads=627caa389f544cd5ef6241525b5b1397bc6f59a1
>> HTTP/1.1" 500 738 "-" "mercurial/proto-1.0"
>>
>> which gives me the 500 error
>>
>
> Do you have access to the Apache error log?

I can't find the raw apache logs on my host's machine, but I get a web
interface.  I saw this under the "SUEXEC error_log" heading:
[2010-04-29 08:33:39]: uid: (3339/thebeeke) gid: (3339/thebeeke) cmd:
hgwebdir.cgi

So Iooked in the "MAIN error_log" for something at the same time and saw this:
[Thu Apr 29 08:33:39 2010] [error] [client m.y.i.p] malformed header
from script. Bad header=4 changesets found: hgwebdir.cgi

So, wow, the error logs actually tell me something.  I searched for
that error message and found a few forum posts with similar problems.
One mentioned turning off verbose in .hgrc which did the trick.  I'm
assuming that's a known issue that verbose = true doesn't work over
http?

Thanks,
Nick


>
> Paul
>



--
~+~+~+~+~+~+~
thebeekeeper.net
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Cannot push to shared server

Paul Boddie-4
Nick Gamroth wrote:
> Fixed it!
> Recorded below for posterity.
>  

Great!

> So, wow, the error logs actually tell me something.  I searched for
> that error message and found a few forum posts with similar problems.
> One mentioned turning off verbose in .hgrc which did the trick.  I'm
> assuming that's a known issue that verbose = true doesn't work over
> http?
>  

So, hgwebdir.cgi should really suppress verbose output, since anything
going to standard output/error is likely to corrupt the Web server's
response stream. For now, I'll put a note on the PublishingRepositories
page, but I think a patch is in order.

Paul
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial