Closed LeeC20 closed 10 months ago
远程也要升级到30.6版本吧
我之前用的30.4, 刚刚从这里下载了,好像还是30.5,不是30.6.... , 远程依然不行 因为我要改文件,所以只能手动安装。 这个repo什么时候更新到30.6
远程也要升级到30.6版本吧
我找到问题了,
当我注释掉 fabric_deploy_helper.py, line 95 -97后, fabric_deploy能够正常使用了。 估计是这个kill进程有问题。
`
# kill_shell = f'''ps -aux|grep {process_mark}|grep -v grep|awk '{{print $2}}' |xargs kill -9'''
# logger.warning(f'{kill_shell} 命令杀死 {process_mark} 标识的进程')
# uploader.ssh.exec_command(kill_shell)
`
当我改成这样, 也可以运行。 不知道什么问题,单独运行paramiko,也是可以。 合起来就报错
`
# uploader.ssh.exec_command(kill_shell)
conn.run(kill_shell, encoding='utf-8',warn=True) # 不想提示,免得烦扰用户以为有什么异常了。所以用上面的paramiko包的ssh.exec_command
`
pip 升级30.6是要使用官方源的,国内源是异步pypi官网的,又不是立即同步,是定时同步,你想第一时间安装最新的python三方包版本,就要 pip install funboost --upgrade -i https://pypi.org/simple ,
估计是你为了下载python包速度快,替换成了国内源
我也试了一下30.6, 还是不能远程。 我自己改了源码就通了。。 就很奇怪
fabric_deploy_helper.py
` line97 - line 98
# uploader.ssh.exec_command(kill_shell)
conn.run(kill_shell, encoding='utf-8',warn=True) # 不想提示,免得烦扰用户以为有什么异常了。所以用上面的paramiko包的ssh.exec_command
`
我是可以的,kill命令就是正常的linux命令,你自己可以打印出kill的linux命令
估计你系统不一样,那就用conn操作呗
下面这个可能适应性强一些吧,我不知道你系统设置了什么类型的鉴权
我远程好像跑不通了。 `
`
`
然后我试了
‘
’ 却可以运行。这是为什么