9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] hg over ssh
@ 2011-12-15 21:44 Troy Cauble
  2011-12-15 22:24 ` ron minnich
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Troy Cauble @ 2011-12-15 21:44 UTC (permalink / raw)
  To: 9fans

Hi all,

Can anyone tell me what I'm missing getting hg to work over ssh.
I've seen some threads on the topic but they seem to end without
an explicit solution.

  cpu% hg -vvv clone -e '/bin/openssh/ssh -2' ssh://192.168.1.88/foo2
  running /bin/openssh/ssh -2 192.168.1.88 "hg -R foo2 serve --stdio"
  remote: abort: Bad file number
  abort: no suitable response from remote hg!

This failure happens before prompting me for a password.
This hg does let ssh prompt me for a password, right?


Thanks,
-troy



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

* Re: [9fans] hg over ssh
  2011-12-15 21:44 [9fans] hg over ssh Troy Cauble
@ 2011-12-15 22:24 ` ron minnich
  2011-12-16  2:58 ` Troy Cauble
       [not found] ` <CAMhmq_9gk1XhDJYQV9_60TB3zVmk+CqW+V7FoODCGZ=huuE1UQ@mail.gmail.c>
  2 siblings, 0 replies; 6+ messages in thread
From: ron minnich @ 2011-12-15 22:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Dec 15, 2011 at 1:44 PM, Troy Cauble <troycauble@gmail.com> wrote:

>  remote: abort: Bad file number
>  abort: no suitable response from remote hg!

for fun, run under ratrace and you'll see the problem. This may be the
top of stack problem but I am not sure. I just don't recall.

ron



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

* Re: [9fans] hg over ssh
  2011-12-15 21:44 [9fans] hg over ssh Troy Cauble
  2011-12-15 22:24 ` ron minnich
@ 2011-12-16  2:58 ` Troy Cauble
       [not found] ` <CAMhmq_9gk1XhDJYQV9_60TB3zVmk+CqW+V7FoODCGZ=huuE1UQ@mail.gmail.c>
  2 siblings, 0 replies; 6+ messages in thread
From: Troy Cauble @ 2011-12-16  2:58 UTC (permalink / raw)
  To: 9fans

> >  remote: abort: Bad file number
> >  abort: no suitable response from remote hg!

> for fun, run under ratrace and you'll see the problem. This may be the
> top of stack problem but I am not sure. I just don't recall.

Well execing /bin/sh problematic:

    730 hg Exec 230f1e 0x59fd40/"/bin/sh" 0x59fd60/"/bin/sh"
0x5a1b60/"-c" 0x5a19a0/"/bin/openssh/ssh -v -2 135.112.125.227 hg -R
foo2 serve --stdio" = 0xffffffff  1323985179203831089
1323985179204203215

I copied /bin/rc to /bin/sh and got the quoting problem I was looking
for before:
    remote: bash: hg -R foo2 serve --stdio: command not found

I could edit mercurial's sshrepo.py code to take out the quotes.
I could edit python's subprocess.py code to call rc instead of sh.
But maybe this has been solved before?
Maybe someone has a nice rc script for sh that would remove the quotes?

Also, I did have to generate keys, the ssh prompt doesn't get through to me.
Also, while it worked at least once (as far as the quote failure),
I seem to have to use '/bin/openssh/ssh -i /usr/troy/lib/ssh/ida_rsa' now.
It doesn't seem to look for ida_rsa there.

Ideas?

BTW, I'm using the stallion 1.7.5 contrib, not the bichued 1.0.2.

Thanks,
-troy



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

* Re: [9fans] hg over ssh
       [not found] ` <CAMhmq_9gk1XhDJYQV9_60TB3zVmk+CqW+V7FoODCGZ=huuE1UQ@mail.gmail.c>
@ 2011-12-16  3:16   ` erik quanstrom
  2011-12-16  4:10     ` Troy Cauble
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2011-12-16  3:16 UTC (permalink / raw)
  To: troycauble, 9fans

> Well execing /bin/sh problematic:
>
>     730 hg Exec 230f1e 0x59fd40/"/bin/sh" 0x59fd60/"/bin/sh"
> 0x5a1b60/"-c" 0x5a19a0/"/bin/openssh/ssh -v -2 135.112.125.227 hg -R
> foo2 serve --stdio" = 0xffffffff  1323985179203831089
> 1323985179204203215
>
> I copied /bin/rc to /bin/sh and got the quoting problem I was looking
> for before:
>     remote: bash: hg -R foo2 serve --stdio: command not found
>
> I could edit mercurial's sshrepo.py code to take out the quotes.
> I could edit python's subprocess.py code to call rc instead of sh.
> But maybe this has been solved before?
> Maybe someone has a nice rc script for sh that would remove the quotes?

how about /bin/ape/sh?

> BTW, I'm using the stallion 1.7.5 contrib, not the bichued 1.0.2.

we are using the python from fgb/bichued which calls rc.  however,
we're not using openssh.  so ymmv.  (contrib bichued/python.)

one would think ape/sh would be less likely to do the wrong thing.

in any event, the python port really could use some improvement,
and updating.  unfortunately, time is short, and stomachs are weak.

- erik



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

* Re: [9fans] hg over ssh
  2011-12-16  3:16   ` erik quanstrom
@ 2011-12-16  4:10     ` Troy Cauble
  2011-12-16  7:31       ` Federico Benavento
  0 siblings, 1 reply; 6+ messages in thread
From: Troy Cauble @ 2011-12-16  4:10 UTC (permalink / raw)
  To: erik quanstrom; +Cc: 9fans

On Thu, Dec 15, 2011 at 10:16 PM, erik quanstrom <quanstro@quanstro.net> wrote:

>> Maybe someone has a nice rc script for sh that would remove the quotes?
>
> how about /bin/ape/sh?

Another thing I didn't know about!
All is well now.

Thanks,
-troy



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

* Re: [9fans] hg over ssh
  2011-12-16  4:10     ` Troy Cauble
@ 2011-12-16  7:31       ` Federico Benavento
  0 siblings, 0 replies; 6+ messages in thread
From: Federico Benavento @ 2011-12-16  7:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

hg expects certain environment... at first I thought it was a quoting issue
that hg didn't rc's quoting, but it might be that it could fork a unix program
or even trying to run /bin/sh it self, anyways this works with the only
hg port I've used and that I know it works, the one in bichued's contrib

% bind /bin/openssh/ssh /bin/ssh
% ape/psh
%  hg clone ssh://whatever

you can search on the list, there are explanations

On Dec 16, 2011, at 1:10 AM, Troy Cauble wrote:

> On Thu, Dec 15, 2011 at 10:16 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> 
>>> Maybe someone has a nice rc script for sh that would remove the quotes?
>> 
>> how about /bin/ape/sh?
> 
> Another thing I didn't know about!
> All is well now.
> 
> Thanks,
> -troy
> 




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

end of thread, other threads:[~2011-12-16  7:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-15 21:44 [9fans] hg over ssh Troy Cauble
2011-12-15 22:24 ` ron minnich
2011-12-16  2:58 ` Troy Cauble
     [not found] ` <CAMhmq_9gk1XhDJYQV9_60TB3zVmk+CqW+V7FoODCGZ=huuE1UQ@mail.gmail.c>
2011-12-16  3:16   ` erik quanstrom
2011-12-16  4:10     ` Troy Cauble
2011-12-16  7:31       ` Federico Benavento

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