Assuming that I cannot run something like this with Fabric:
run("svn update --password 'password' .")
how's the proper way to pass to Fabric the password for the remote interactive command line?
The problem is that the repo is checked out as svn+ssh and I don't have a http/https/svn option
Try SSHkey. It allows you to connect to the server without password. In this case, you will have to setup a sshkey between your remote server and the repo.
At remote server: Generate key pair
$ ssh-keygen -t dsa
Leave the passphase empty! This will generate 2 files
Then, append the content in id_dsa.pub to ~/.ssh/authorized_keys at repo server.
Your remote server will be able to update the source tree without any password required.
If yout just want to hide your password from log, you can use something like this:
from fabric.state import output
def xrun(command, hidden='', *args, **kwargs):
old_state = output.running
output.running = False
print '[%s] run: %s' % (env.host_string, command)
run(command + hidden, *args, **kwargs)
output.running = command
xrun('svn update', '--password "your password"')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With