简体   繁体   English

面料和git问我密码短语

[英]fabric and git ask me passphrase

I'm using fabric to automate my deploy. 我正在使用结构来自动执行部署。

If I connect with ssh to the production server: 如果我使用ssh连接到生产服务器:

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). git没问我什么(因为我已经在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 更新:也带有一个简单的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 F

尝试使用以下

env.forward_agent = True

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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