Password caching

Nicholas Allen nick.allen at
Wed Nov 29 20:54:29 GMT 2006

Specifying the password on the command line in the url does not work
like you said because bzr is spawning the ssh process.

Thing is I want to run these pushes from a shell script in a cron job so
it is important that I am not asked for the password.

I do not have ssh access to the remote machine (only sftp). I tried
using a location like sftp+paramiko://user@host/dir but this did not
work. So I'm not sure how I can force use of paramiko for sftp.

Public key authentication is also not possible.

Anyone have any other suggestions what else I can do?



John Arbash Meinel wrote:
> Erik Bågfors wrote:
>> This is a bad idea, but....
>> isn't it possible to use "sftp://user:password@host/path/to/branch ?
>> /Erik
> Not if you spawn an ssh subprocess, rather than using the paramiko builtin.
> Which also brings up a problem in any password caching scheme that we
> implement. Namely that 'ssh' itself does not provide an easy way to pass
> it the password. So even if bzr remember the password, how would it pass
> it on? 'ssh' grabs direct access to the terminal, rather than going
> through stdin, so you would have to somehow create a pseudo TTY for ssh
> to use, etc.
> Alternatively, we could do something like ssh+paramiko:// or maybe an
> ENV var to force it to use the paramiko implementation, which may be
> slower, and won't read ~/.ssh/config (or at least not all of it), but
> might let you use a password.
> John
> =:->

More information about the bazaar mailing list