提示输入密码时出现结构任务错误
我遇到了一个似乎无法克服的错误。我有一个简单的结构任务,必须以远程系统上的不同用户身份运行,例如:
def update():
env.user = 'otheruser'
#~ env.password = 'otherpass' # this works, but I don't want it here.
with cd(env.sitefolder):
run('hg pull -u')
如果我使用 env.password 硬编码运行它,它就可以工作。如果我使用 fab -p otherpass update ,它也可以工作。如果我省略它文档说我会收到提示。这是事实,但行不通。每次输入密码后,我都会收到此错误:
> fab dev update
[darkstar] Executing task 'update'
[darkstar] run: hg pull -u
[darkstar] Login password:
ERROR:paramiko.transport:Exception: Error reading SSH protocol banner
...
Fatal error: Error reading SSH protocol banner
Aborting.
在 Ubuntu Natty 上使用 Fabric 1.2.2。我还尝试了 env.no_keys 选项,但它没有改变任何东西。有人可以帮忙吗?
I'm having an error I can't seem to get past. I have a simple fabric task that must be run as a different user on the remote system, e.g:
def update():
env.user = 'otheruser'
#~ env.password = 'otherpass' # this works, but I don't want it here.
with cd(env.sitefolder):
run('hg pull -u')
If I run this with env.password hardcoded it works. If I use fab -p otherpass update
it works too. If I omit it the docs say I will get prompted. This is true, but it doesn't work. Every time after entering the password I get this error:
> fab dev update
[darkstar] Executing task 'update'
[darkstar] run: hg pull -u
[darkstar] Login password:
ERROR:paramiko.transport:Exception: Error reading SSH protocol banner
...
Fatal error: Error reading SSH protocol banner
Aborting.
Using fabric 1.2.2 on Ubuntu Natty. I also tried the env.no_keys option but it didn't change anything. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
提示您自己输入密码!
getpass
是标准库的一部分,它只是一个raw_input
,不会回显您输入的内容Prompt for the password yourself!
getpass
is part of the standard library, it's just araw_input
that doesn't echo what you type如果目标内存/磁盘空间不足,也可能会发生这种情况。重新启动和/或解决内存/磁盘空间问题可以解决此问题。
This can also happen if target is out of memory/disk space. Restarting and/or solving memory/disk space problems can solve this.