繁体   English   中英

GitLab-CI:无法再使用 lftp 进行部署

[英]GitLab-CI: can't deploy using lftp any more

我在 GitLab CI 中的部署脚本有问题,该脚本过去两年一直有效。 一周左右以来,根 ECDSA 的自动验证不起作用(我正在使用 lftp 部署一些文件)。

这就是管道的输出过去的样子。

$ lftp -u $FTP_USERNAME,$FTP_PASSWORD -p 22 sftp://my.ftp.server -e "debug; set sftp:auto-confirm yes; mirror --reverse --verbose --delete public/ mount/; bye"
---- Running connect program (ssh -a -x -s -l ftp_products -p 22 my.ftp.server sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- The authenticity of host 'my.ftp.server (xxx.xxx.xxx.xxx)' can't be established.
<--- ECDSA key fingerprint is SHA256:Z2s4NdXMJ04EfN3jm4xZ/ZwJE4E6Lj/HP8oHWzIod4M.
<--- Are you sure you want to continue connecting (yes/no)? yes

请注意, ssh 要求确认是否继续,这yes通过命令行选项sftp:auto-confirm yes 管道按预期继续。

从上周开始,我从我的部署脚本中得到了这个输出:

$ lftp -u $FTP_USERNAME,$FTP_PASSWORD -p 22 sftp://my.ftp.server -e "debug; set sftp:auto-confirm yes; mirror --reverse --verbose --delete public/ mount/; bye"
---- Running connect program (ssh -a -x -s -l ftp_products -p 22 my.ftp.server sftp)
---> sending a packet, length=5, type=1(INIT), id=0
The authenticity of host 'my.ftp.server (xxx.xxx.xxx.xxx)' can't be established.
<--- ECDSA key fingerprint is SHA256:Z2s4NdXMJ04EfN3jm4xZ/ZwJE4E6Lj/HP8oHWzIod4M.
**** Timeout - reconnecting
---- Disconnecting
---- Running connect program (ssh -a -x -s -l ftp_products -p 22 my.ftp.server sftp)
---> sending a packet, length=5, type=1(INIT), id=0
The authenticity of host 'my.ftp.server (xxx.xxx.xxx.xxx)' can't be established.
<--- ECDSA key fingerprint is SHA256:Z2s4NdXMJ04EfN3jm4xZ/ZwJE4E6Lj/HP8oHWzIod4M.
**** Timeout - reconnecting
---- Disconnecting

请注意, ssh 甚至不会提示yes|no ,因此自动确认指纹的命令行选项无效。

有没有人以前遇到过这个问题并有解决方案?

在我的 GitLab CI 中使用node docker 映像时,我开始遇到同样的问题,它在后台使用 Debian。 我只是使用node意味着实际上它是node:latest ,这很可能会使用最新的 Debian 版本。

我在 Debian 网站上发现以下错误报告,其中提到lftp和 Debian Bullseye 版本存在问题,实际上没有显示 SSH 提示。 Debian Buster 工作得很好。

我将图像切换到node:bullseye并且这个问题仍然存在。 然后我将图像更改为旧node:buster ,问题就消失了。

我建议调查您的图像以确定它基于什么操作系统。 如果那也是 Debian,请尝试使用版本。 希望这会很快得到修复。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM