Known_hosts do not taking effect

Hello all, this is my first post. After searching for genuine solution online I found none so I decided to open this.

Earlier I was trying to avoid the ‘ask for continue connecting?’, in the Travis Doc it said to include

    known_hosts: ${IP_ADDRESS}

in the travis.yml
and when the build is running I can write the ssh-keyscan in to the file /travis/home/.ssh/known_hosts
(I know that by running cat command)
But then in my ssh connect line they still ask for my permission!!

So I guess the build does not read configuration from the mentioned file although I did as instructed

My workaround is passing

 -o StrictHostKeyChecking=no

to the ssh command but I feel very guilty about that

Are you setting ${IP_ADDRESS} with an environment variable? This would not work because we configure the ssh known hosts and clone the git repository before environment variables are set. You must use predefined name or numeric IP address.

I just type that for privacy reason, in the travis I hardcode the address :slight_smile:

Without complete information, I cannot give you accurate advice. If you’d rather communicate privately, please email Thanks.