Hi Everyone,
I have a simple method in a fabfile.py:
def pull_beta():
with cd(env.code_dir_beta):
run("git pull origin master")
The remote server need a passphrase to unlock the key for ~/.ssh/id_rsa, so for it, I am forwarding my local key authentication to the server with the option: env.forward_agent = True. Also I have the line: env.host_string = '
address@hidden, because my local user is not the same in the remote server.
The pull work fine if I run it by hand in the terminal. The key forward do his job. The problem is when I try automate this task through a cron job. The pull does not work, seems like the key forward does not work.
My entry for the cron job is:
30 1 * * * /usr/bin/fab -f /home/manuel/www/web.local/fabfile.py pull_beta
I try remove also without sucess (and removed the option env.forward_agent = True from the fabfile.py ):
30 1 * * * /usr/bin/fab -A -i ~/.ssh/id_rsa -f /home/manuel/www/web.local/fabfile.py pull_beta
Note, the remote server does not has Fabric install.
Thanks for any tips.