fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] entering password multiple times on invoke


From: Christian Vest Hansen
Subject: Re: [Fab-user] entering password multiple times on invoke
Date: Wed, 25 Mar 2009 11:21:25 +0100

Fabric caches the passwords on a per-host basis. However, this cache
is defeated by `invoke()` for some reason.

Note that `invoke()` only makes sense if you really do not want to
execute the specified command if it has already been executed with the
given arguments in the Fabric-session.

If it really bothers you, then you can work around the issue by
letting the invoked command, in this case "bar", set a flag on the
config object and return immediately if it is already set.

I would personally like to not have to tinker with this part of the
code for the time being.

On Wed, Mar 25, 2009 at 9:15 AM, Alex Koshelev <address@hidden> wrote:
> As I understand each run call creates new remote session to host. So
> you must each time provide password. I think that you can set
> `fab_password` config variable or copy your public key identity to
> needed hosts.
>
> On Wed, Mar 25, 2009 at 8:57 AM, Leo Shklovskii <address@hidden> wrote:
>> Hi,
>>
>> I'm wondering if I'm doing something wrong or if this behavior is by design.
>> For a fabfile.py that looks like this:
>>
>> def prod():
>>  config.fab_hosts = ['my.webserver.com']
>>
>> def foo():
>>  require('fab_hosts', provided_by=prod)
>>  run('ls')
>>  invoke(bar)
>>
>> def bar():
>>  require('fab_hosts', provided_by=prod)
>>  run('pwd')
>>
>> when I run: 'fabric prod foo' I get prompted for the password to
>> my.webserver.com twice. once at the entry point for foo and once for bar.
>>
>> Ideally the password would just be available for the entire session and
>> required to be entered only once...
>>
>> This is using fabric-0.1.0
>>
>> --
>> --Leo
>>
>>
>> _______________________________________________
>> Fab-user mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/fab-user
>>
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.




reply via email to

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