Fab 未找到主机密钥
感谢您花时间查看我的帖子。
我有一个 django 站点正在运行,我正在尝试通过 fab 从本地(Windows)计算机在远程(ubuntu)主机上运行命令。我已经设置了 env.key_filename,但每次运行命令时都会提示我输入用户密码。
有人有什么建议吗?
Fab 片段:
env.key_filename = "path\to\key.ppk"
env.no_keys = True
env.name = 'testing'
env.user = 'ubuntu'
env.project_name = 'PROJECT'
env.project_root = '/home/%(user)s/venvs/%(name)s/%(project_name)s/' % env
env.host_string = 'myIp'
env.branch = 'master'
env.venv = 'source /home/%(user)s/venvs/%(name)s/bin/activate && ' % env
控制台:
>fab testing install_requirements
[myIp] run: source /home/ubuntu/venvs/testing/bin/activate && pip install -r requirements.txt
Password for ubuntu@myIP:
Thank you for taking the time to look at my post.
I have a django site up and running, and I am trying to run a command on the remote (ubuntu) host from my local (windows) computer via fab. I have set the env.key_filename, but every time I run a command I am prompted for the user's password.
Does anyone have any suggestions?
Fab Snippet:
env.key_filename = "path\to\key.ppk"
env.no_keys = True
env.name = 'testing'
env.user = 'ubuntu'
env.project_name = 'PROJECT'
env.project_root = '/home/%(user)s/venvs/%(name)s/%(project_name)s/' % env
env.host_string = 'myIp'
env.branch = 'master'
env.venv = 'source /home/%(user)s/venvs/%(name)s/bin/activate && ' % env
Console:
>fab testing install_requirements
[myIp] run: source /home/ubuntu/venvs/testing/bin/activate && pip install -r requirements.txt
Password for ubuntu@myIP:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来就像 Fabric 问题 #265。您应该使用 OpenSSH 密钥,而不是 .ppk。
Looks to me like Fabric issue #265. You should use an OpenSSH key, not a .ppk.