I’m new to CircleCI and I’m having an issue that others have had before, but won’t resolve for me no matter what I try.
At the last step, where
ssh I get
The authenticity of host '188.8.131.52 (184.108.40.206)' can't be established
ECDSA key fingerprint is SHA256:xxxxx. Are you sure you want to continue connecting (yes/no)?
- Recreating a new key with no passphrase on the host server, and adding that to CircleCI’s project settings
StrictHostKeyChecking noto the client’s (Docker instance)
add_ssh_keysand adding the corresponding fingerprint (as shown in the CircleCI UI, under SSH keys in project settings)
- Adding to
known_hostson the client instance, both using
ssh-keyscanand by directly writing the host + signature as it appears on my local machine’s
- Trying to add options directly to my rsync/ssh command:
rsyncwith and without
- My config is below, exactly as it appears in my repo (some things I tried earlier are commented out)
- I edited the IP addresses and signatures for the purpose of this post
version: 2 jobs: build: working_directory: ~/frontend docker: - image: circleci/node:11.11.0-stretch-browsers steps: - type: shell shell: /bin/sh pwd: / command: sudo apt update && sudo apt install git -y && git --version # Update environment - run: sudo apt update - run: sudo apt-get install rsync # Sync the SSH keys # - run: # name: skip key authentication message # command: | # sudo cat ~/.ssh/config # sudo chmod 400 ~/.ssh/config # echo "PubkeyAuthentication yes" >> ~/.ssh/config # echo "StrictHostKeyChecking no" >> ~/.ssh/config # service sshd restart - add_ssh_keys: fingerprints: - "88:1a:2b:3c:4d:5f:1a:2b:3c:4d:5f" # Check out the code in the project directory - checkout # Install JS dependencies # - run: yarn install --no-progress --non-interactive --silent --pure-lockfile - run: npm ci - run: sudo npm install nuxt -g --loglevel=error # Run build command - run: sudo nuxt build # Add the server to known hosts - run: name: add to known hosts command: | sudo ssh-keyscan -H 220.127.116.11 >> ~/.ssh/known_hosts sudo echo "18.104.22.168 ecdsa-sha2-nistp256 AAABBBL09....AAAAQ=" >> ~/.ssh/known_hosts # Upload files to server. - run: sudo rsync -avce ssh --delete ./dist/ -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null firstname.lastname@example.org:/home/production/frontend