# Authorization Failed Capistrano Push

**URL:** https://discourse.roots.io/t/authorization-failed-capistrano-push/3377
**Category:** bedrock
**Tags:** deploys
**Created:** 2015-03-30T22:14:47Z
**Posts:** 9

## Post 1 by @brandon — 2015-03-30T22:14:48Z

Running into this error when running `cap production deploy` I’m running into this error: `SSHKit::Runner::ExecuteError: Exception while executing on host calton.dev: Authentication failed for user vagrant@domain.dev`

This was working fine yesterday, nothing has changed.

Running `vagrant ssh` still allows me to ssh correctly into the VM.

---

## Post 2 by @kalenjohnson — 2015-03-30T22:21:38Z

Looks like you’re running Capistrano from your VM. Is that normally how you do it?

---

## Post 3 by @brandon — 2015-03-30T22:48:43Z

No, I’m running Cap from OSX

---

## Post 4 by @kalenjohnson — 2015-03-30T22:49:35Z

> [@brandon](#):
>
> Authentication failed for user vagrant@domain.dev

That makes me think you’re in a VM.

---

## Post 5 by @brandon — 2015-03-30T22:56:18Z

I’m not. I’m in my bedrock project directory. From the directory if I run `cap production deploy` I get the above error. From the same directory, I can `vagrant ssh` in correctly. If I then `exit` out of the vm, run `cap production deploy` I get the same error (obviously.)

`SSHKit::Runner::ExecuteError: Exception while executing on host calton.dev: Authentication failed for user vagrant@calton.dev` the exact error.

---

## Post 6 by @brandon — 2015-03-30T23:01:26Z

I just ran a deploy on another bedrock project, and it worked correctly. So I don’t know at this point.

---

## Post 7 by @austin — 2015-03-30T23:28:44Z

What does your production.rb look like?

---

## Post 8 by @brandon — 2015-03-30T23:36:33Z

```
set :stage, :production
set :wpcli_remote_url, "https://www.remotedomain.com"
set :wpcli_local_url, "https://localdomain.dev"

# Extended Server Syntax
# ======================
server 'www.remotedomain.com', user: 'deploy', group: 'www-data', roles: %w{web app db}

set :ssh_options, {
    keys: %w(~/.ssh/id_rsa)
  }

fetch(:default_env).merge!(wp_env: :production)
```

---

## Post 9 by @brandon — 2015-03-31T17:24:19Z

It was when I added

```
server "calton.dev", user: 'vagrant', roles: %w{dev}
set :dev_path, '/srv/www/calton.dev/current'
```

to my deploy.rb file. I added this for for the wpcli db push and pull wrapper.

Removing this fixed it.
