monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] --non-interactive: run in non-interactive


From: Zbigniew Zagórski
Subject: Re: [Monotone-devel] --non-interactive: run in non-interactive
Date: Thu, 31 Jan 2008 09:33:14 +0100

2008/1/31, William Uther <address@hidden>:
> Why not just make sure the user has a lua hook with a passphrase in
> it.  Perhaps
> something like this (untested):
>
> cat > newhook.lua <<EOF
>
> function get_passphrase_bogus(keypair_id)
>      return "this is probably not the passphrase"
> end
>
> if (get_passphrase == nil) then
>      get_passphrase  = get_passphrase_bogus
> end
>
> EOF

Because mtn treats password from lua hook as weak. If it's nil, empty
or wrong then monotone asks for correct password on tty. We
could fix this, it's one thing, but it's only specific behaviour of one
hook.

My reasoning is it would be good to have contract between user
and monotone which clearly says "don't touch stdin/tty and don't
ask questions" because for example you are part of some automation
interface..

On the other hand i don't know how current code can enforce this
contract esp in lua hooks. I'll look at that ...
 ...

>
> The other option would be to encourage people to use ssh-agent.
> Perhaps automating
> that process for them would help: Export their keys in the right form,
> check if the SSH_AUTH_SOCK
> environment variable is set, and if it is then see if the key is
> loaded and if not, load it in for the user (prompting for the password
> yourself).

I don't know how it works currently for default but when i'm on
unix box and have ssh-agent env setup (aka connected via ssh)
mtn always automatically adds my key to agent so I enter password only
once in such agent life.
However on windows i don't see this behaviour. I always
have pageant running and key can be added only by explicit command.

-- 
Zbigniew -zbigg- Zagórski
/ software developer / geek / happy daddy /

reply via email to

[Prev in Thread] Current Thread [Next in Thread]