gpt4 book ai didi

python - Fab 未找到主机 key

转载 作者:行者123 更新时间:2023-11-30 23:49:22 25 4
gpt4 key购买 nike

感谢您花时间查看我的帖子。

我有一个 django 站点正在运行,我正在尝试通过 fab 从我的本地(Windows)计算机在远程(ubuntu)主机上运行命令。我已经设置了 env.key_filename,但每次运行命令时都会提示我输入用户密码。

有人有什么建议吗?

精彩片段:

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:

最佳答案

在我看来像 Fabric issue #265 。您应该使用 OpenSSH key ,而不是 .ppk。

关于python - Fab 未找到主机 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7674823/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com