I have a fab file containing
env['hosts'] = ['localhost'] env['user'] = 'code' env['password'] = 'searce' def mk_dirtree(): sudo("mkdir %s" % PROJECT_DIR) sudo("chown -R code:code %s" % PROJECT_DIR) run("mkdir -p %s" % (PROJECT_DIR + '/www/static')) sudo("chown -R www-data:www-data %s" % (PROJECT_DIR + '/www'))
now when i do fab mk_dirtree I constantly ask for [localhost] Login password for 'code':
I run this on an ec2 instance, to which I connect via ssh using a key, and the password for ssh is disabled
EDIT: I think the fabric first does ssh code@localhost , but this does not work as sshing password is disabled
python ssh fabric
user1632167
source share