面料部署问题

时间:2010-05-31 12:05:00

标签: django fabric

我正在尝试使用fabric部署django应用程序并获取以下内容 错误:

Alexs-MacBook:fabric alex$ fab config:instance=peergw deploy -H <ip> - 
u <username> -p <password> 

[192.168.2.93] run: cat /etc/issue 

Traceback (most recent call last): 

  File "build/bdist.macosx-10.6-universal/egg/fabric/main.py", line 

419, in main 

  File "/Users/alex/Rabota/server/mx30/scripts/fabric/fab/ 

commands.py", line 37, in deploy 

    checkup() 

  File "/Users/alex/Rabota/server/mx30/scripts/fabric/fab/ 

commands.py", line 140, in checkup 

    if not 'Ubuntu' in run('cat /etc/issue'): 

  File "build/bdist.macosx-10.6-universal/egg/fabric/network.py", line 

382, in host_prompting_wrapper 

  File "build/bdist.macosx-10.6-universal/egg/fabric/operations.py", 

line 414, in run 

  File "build/bdist.macosx-10.6-universal/egg/fabric/network.py", line 

65, in __getitem__ 

  File "build/bdist.macosx-10.6-universal/egg/fabric/network.py", line 

140, in connect 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/client.py", 

line 149, in load_system_host_keys 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/hostkeys.py", 

line 154, in load 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/hostkeys.py", 

line 66, in from_line 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/rsakey.py", 

line 61, in __init__ 

paramiko.SSHException: Invalid key 

Alexs-MacBook:fabric alex$ 

我无法通过ssh连接到服务器。什么可以成为我的问题?

此致,Arshavski Alexander。

2 个答案:

答案 0 :(得分:1)

在这里走出困境,我说你的SSH密钥不正确:

  

paramiko.SSHException:无效的密钥

当您尝试使用您提供给结构的用户名和密码时,服务器会说什么?

第二个想法:当您为Fabric提供密码时,可能会建议您的SSH主机密钥已更改和/或尚未添加到~/.ssh/known_hosts

答案 1 :(得分:1)

是的,我会说你要连接的机器上的主机密钥已经改变了。 (或者您从一台从未通过“xxx是未知主机的机器连接,是否要将其添加到已知主机列表?”对话框。)

如果您不关心中间人攻击或者几天前自己更改了密钥,请在您的env.variables中的某处添加以下行:

env.disable_known_hosts = True

应该照顾它!