Manuel Gonzalez
2014-03-24 13:34:58 UTC
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
= '***@thehost.com, 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.
I did a lot of test without success. I try remove the option for forward
my local key and set a user and password with env, but seems there are not
an option yet for tell Fabric the password for other than sudo prompts. I
read it here:
http://lists.nongnu.org/archive/html/fab-user/2010-06/msg00000.html .
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.
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
= '***@thehost.com, 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.
I did a lot of test without success. I try remove the option for forward
my local key and set a user and password with env, but seems there are not
an option yet for tell Fabric the password for other than sudo prompts. I
read it here:
http://lists.nongnu.org/archive/html/fab-user/2010-06/msg00000.html .
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.