简体   繁体   中英

Circle CI how to deploy to ssh - error The authenticity can't be established

I would like to deploy my code into my server using SSH.

I add ssh key to circle ci settings.

In circle ci pipeline I have code...

scp -q -r /build root@XXXXXXXX:/root/test

problem is, that I have The authenticity of host 'XXXXXXXX (XXXXXXXX )' can't be established. message. How can I skip it or confirm it?

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)? 

How can I respond to the prompt in a circle ci pipeline job? It is running somewhere on some server.

You are looking for option -o StrictHostKeyChecking=no . Below code should do this. scp -q -r -o StrictHostKeyChecking=no /build root@XXXXXXXX:/root/test

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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