【发布时间】:2019-09-25 11:52:11
【问题描述】:
我正在尝试使用在 linux 机器上运行的 jenkins 将一些文件从 linux 服务器复制到 ec2 实例,但遇到以下问题:
debug1: read_passphrase: can't open /dev/tty: No such file or directory
Host key verification failed.
lost connection
我使用的复制命令:
sh 'scp -v -i /path/key.pem /path_to_my_file/file.txt user@host:/path_to_target'
【问题讨论】:
-
管道运行的Jenkins服务账号默认没有配置shell。这似乎是您的
pem无法在管道中验证的根本原因。您可能需要以不同的方式处理这个问题,或者解决它。
标签: linux amazon-web-services jenkins amazon-ec2 jenkins-pipeline