I am ssh-ing into my linux environment to deploy.
- I defined my variables
SSH_HOSTin my project
- During the environment set up stage, I see that something is there
Using environment variables from project settings and/or contexts: CIRCLE_JOB=**REDACTED** SSH_HOST=**REDACTED** SSH_USER=**REDACTED**
- However, I get this error below
#!/bin/bash -eo pipefail ssh $SSH_USER@SSH_HOST 'sudo curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -' ssh: Could not resolve hostname ssh_host: Name or service not known Exited with code exit status 255
- It does work if I hardcode by ssh values but then I have to commit them to git. My config file is below. Can anyone assist in explaining why this is not working?
version: 2.1 orbs: node: firstname.lastname@example.org jobs: build: machine: enabled: true steps: - add_ssh_keys: fingerptints: - "my:fingerprint:is:here" - checkout - run: name: Installing nvm and node... # does not work if i abstract into variables # but it does work if I hard code SSH_USER and SSH HOST in here command: | ssh SSH_USER@SSH_HOST 'sudo curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -' workflows: build_and_test: jobs: - build