小编bmi*_*vic的帖子

Git 使用 Fabric 拉取远程主机

我正在尝试在 fabfile.py 中编写部署脚本。这是我的代码:

from fabric.api import *

env.user = 'user'
env.hosts = ['my_host']
env.dbname = 'foo.bar'
env.dbuser = 'pg_user'
env.dbpass = 'pg_user'
code_dir = '/cygdrive/d/folder'


def deploy():
    with cd(code_dir):
        run('git pull')
        run('pip install -r requirements.txt')
        run('manage.py migrate --all')
        run('net stop Apache2.2')
        run('net start Apache2.2')
Run Code Online (Sandbox Code Playgroud)

当我尝试fab deploy 时,出现错误:

    [my_host] Executing task 'deploy'
    [my_host] run: git pull
    [my_host] out: Host key verification failed.
    [my_host] out:
    [my_host] out: fatal: Could not read from remote repository.
    [my_host] out:
    [my_host] out: Please make …
Run Code Online (Sandbox Code Playgroud)

git bitbucket fabric

5
推荐指数
0
解决办法
950
查看次数

标签 统计

bitbucket ×1

fabric ×1

git ×1