我想使用SSH将代码部署到服务器中。
我添加ssh键来圈出ci设置。
在Circ Ci管道中,我有代码...scp -q -r /build root@XXXXXXXX:/root/test
问题是,我有The authenticity of host 'XXXXXXXX (XXXXXXXX )' can't be established.
消息。如何跳过或确认?
scp -q -r /build root@XXXXXXXX:/root/test
The authenticity of host 'XXXXXXXX (XXXXXXXX )' can't be established.
ECDSA key fingerprint is SHA256:6+xxxx.
Are you sure you want to continue connecting (yes/no)?
如何在循环CI管道作业中响应提示?它正在某个服务器上的某个位置运行。
最佳答案
您正在寻找-o StrictHostKeyChecking=no
选项。下面的代码应该执行此操作。scp -q -r -o StrictHostKeyChecking=no /build root@XXXXXXXX:/root/test