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 <[email protected]> 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 <[email protected]> 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 >> [email protected] >> http://lists.nongnu.org/mailman/listinfo/fab-user >> > > > _______________________________________________ > Fab-user mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/fab-user > -- Venlig hilsen / Kind regards, Christian Vest Hansen. _______________________________________________ Fab-user mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/fab-user
