# Having trouble deploying to digitalocean from circleci

**URL:** <https://discuss.circleci.com/t/having-trouble-deploying-to-digitalocean-from-circleci/36385>\
**Category:** Deployments\
**Created:** [June 20, 2020, 12:11am UTC](https://discuss.circleci.com/t/having-trouble-deploying-to-digitalocean-from-circleci/36385 "2020-06-20T00:11:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![www.alexwallish.com](https://avatars.discourse-cdn.com/v4/letter/w/c4cdca/32.png) [@www.alexwallish.com](https://discuss.circleci.com/u/www.alexwallish.com)\
**Post date:** [June 20, 2020, 12:11am UTC](https://discuss.circleci.com/t/having-trouble-deploying-to-digitalocean-from-circleci/36385/1 "2020-06-20T00:11:21Z")

</div>

I’m very new to circleci and attempting to deploy an application to digital ocean.  
I want to ssh into the digital ocean machine and then run a deploy script.  
I’ve tried running a number of different things, but can’t get any to work.  
Here is my most recent config:

```auto
version: 2
jobs: # A basic unit of work in a run
  build: # runs not using Workflows must have a `build` job as entry point 
    # directory where steps are run
    working_directory: ~/gitrepos
    docker: # run the steps with Docker
      # CircleCI Python images available at: https://hub.docker.com/r/circleci/python/
      - image: circleci/python:3.6.9
        environment: # environment variables for primary container
          TEST_VAR: hello
    steps: # steps that comprise the `build` job
      - checkout # check out source code to working directory
      - run:
          command: |
            sudo pip install virtualenv
            sudo python3 -m venv virt
            source virt/bin/activate
            sudo pip install -r Fish/requirements.txt
  deploy:
    machine: true
    steps:
      - add_ssh_key:
        fingerprints: "my:super:cool:fingerprint"
      - run: ssh root@$my.ip.address "./deploy.sh"

workflows:
  version: 2
  build-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
          filters:
            branches:
              only: master

```

this produces the following error:

```auto
Build-agent version 1.0.34446-05905e76 (2020-06-16T11:27:30+0000)

Configuration errors: 1 error occurred:

* Error migrating config to version 2: 1 error occurred:

* in job 'deploy': step was not in the right format (unable to find step's name/details)

```

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![yannCI](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/yannci/32/24866_2.png) [@yannCI](https://discuss.circleci.com/u/yannCI)\
**Post date:** [September 29, 2020, 10:29am UTC](https://discuss.circleci.com/t/having-trouble-deploying-to-digitalocean-from-circleci/36385/3 "2020-09-29T10:29:23Z")

</div>

Hi @www.alexwallish.com,

Welcome to the CircleCI community!

I suspect the issue stems from an incorrect syntax. Please try with the following:

```auto
  deploy:
    machine: true
    steps:
      - add_ssh_key:
          fingerprints:
            - "my:super:cool:fingerprint"
      - run: ssh root@$my.ip.address "./deploy.sh"

```

You can also refer to the [“_Adding an SSH Key to CircleCI_” documentation](https://circleci.com/docs/2.0/add-ssh-key/#adding-ssh-keys-to-a-job)
