简体   繁体   中英

fabric and git ask me passphrase

I'm using fabric to automate my deploy.

If I connect with ssh to the production server:

freelance@freelance:~$ cd /var/www/freelance/
freelance@freelance:/var/www/freelance$ git pull
Already up-to-date.
freelance@freelance:/var/www/freelance$ git pull
Already up-to-date.
freelance@freelance:/var/www/freelance$ whoami
freelance

git don't ask me anything (because I have set the keys on bitbucket).

But if I use fabric, it works, but he ask me the passphrase:

(ve)bepxxx-3411:freelance d$ fab git_pull  
[peaidjosparino.cloudapp.net] Executing task 'git_pull'  
[peaidjosparino.cloudapp.net] run: git pull
[peaidjosparino.cloudapp.net] Passphrase for private key: 
[peaidjosparino.cloudapp.net] Login password for 'freelance': 
[peaidjosparino.cloudapp.net] out: Already up-to-date.
[peaidjosparino.cloudapp.net] out: 


Done.
Disconnecting from peaidjosparino.cloudapp.net... done.

The user is the same, the server is the same.

Any ideas?

UPDATE: also with a simply uname -a

(ve)bdxx-3411:freelance d$ fab test_prova
[peaidjosparino.cloudapp.net] Executing task 'test_prova'
[peaidjosparino.cloudapp.net] run: uname -a
[peaidjosparino.cloudapp.net] Passphrase for private key: 
[peaidjosparino.cloudapp.net] Login password for 'freelance': 
[peaidjosparino.cloudapp.net] out: Linux freelance 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[peaidjosparino.cloudapp.net] out: 


Done.
Disconnecting from peaidjosparino.cloudapp.net... done.

f

尝试使用以下

env.forward_agent = True

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM