Node/VueJS deployment

Hi,

I am very new to circleCi and have managed to build my node/vue application on the circleCI, but very stuck with the deployment stage. I am getting the followig error. Any help will be deeply appreciated.

Blockquote
ls -al
rsync -a dist/* $SSH_USER@$SSH_HOSTNAME:/var/www/vhosts/web.com/web.com
total 524
drwxrwxr-x 7 circleci circleci 4096 Sep 16 12:50 .
drwxr-xr-x 16 circleci circleci 4096 Sep 16 12:50 …
-rw-rw-r-- 1 circleci circleci 66 Sep 16 12:50 babel.config.js
drwxrwxr-x 2 circleci circleci 4096 Sep 16 12:50 .circleci
drwxr-xr-x 6 circleci circleci 4096 Sep 16 12:49 dist
drwxrwxr-x 8 circleci circleci 4096 Sep 16 12:50 .git
-rw-rw-r-- 1 circleci circleci 230 Sep 16 12:50 .gitignore
-rw-rw-r-- 1 circleci circleci 107 Sep 16 12:50 jsconfig.json
-rw-rw-r-- 1 circleci circleci 1533 Sep 16 12:50 package.json
-rw-rw-r-- 1 circleci circleci 481935 Sep 16 12:50 package-lock.json
drwxrwxr-x 2 circleci circleci 4096 Sep 16 12:50 public
-rw-rw-r-- 1 circleci circleci 329 Sep 16 12:50 README.md
drwxrwxr-x 8 circleci circleci 4096 Sep 16 12:50 src
-rw-rw-r-- 1 circleci circleci 59 Sep 16 12:50 vue.config.js
ssh: connect to host ************* port 22: Connection timed out
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]
Exited with code exit status 255
CircleCI received exit code 255

Anxioulsy waiting for any assistance.

Hi! It looks like it’s stuck on the SSH connection, so I would make sure you’re following all of the steps here first.

Thanks for your response.

I have followed your guide, by creating an ssh in bitbucket and adding it to my server’s authorised key --but that meant i have to enable pipeline in bitbucket. On the other hand i already had created a key on my server and put the private keys on the circleci’s Additional SSH Keys and added the fingerprint to the config file. My config;

version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:10

working_directory: ~/webdirectory.com

steps:
  - checkout
  - attach_workspace:
      at: ~/webdirectory.com

  # Download and cache dependencies
  - restore_cache:
      keys:
        - v1-dependencies-{{ checksum "package.json" }}
        # fallback to using the latest cache if no exact match is found
        - v1-dependencies-

  - run:
      name: Installing vue globally and caching dependencies
      command: |
        npm set prefix=/home/circleci/npm && echo 'export PATH=$HOME/circleci/npm/bin:$PATH' >> /home/circleci/.bashrc
        npm install -g @vue/cli

  - run:
      name: Installing the package.json dependencies
      command: npm install

  - save_cache:
      paths:
        - ./node_modules
      key: v1-dependencies-{{ checksum "package.json" }}
  # run build!
  - run: npm run build
  - persist_to_workspace:
      root: .
      paths: dist
  # run tests!
  #- run: yarn test

deploy:
machine:
enabled: true
working_directory: ~/webdirectory.com
steps:
- checkout
- attach_workspace:
at: ~/webdirectory.com
- add_ssh_keys:
fingerprints:
- “50:b5:be: = generated from server and copied to authorized_keys”
- run:
name: Deploying to production
command: |
ls -al
rsync -a dist/* $SSH_USER@$SSH_HOSTNAME:/var/www/vhosts/webdirectory.com

Where will i be going wrong???