Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7984703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:21:26+00:00 2026-06-04T11:21:26+00:00

Why am I getting authenicationFailed when I try to run deploy setup? I am

  • 0

Why am I getting authenicationFailed when I try to run deploy setup? I am using the ssh as my password. Do I need to change anything in the database.yml or deploy.rb. They are listed below.

$ cap deploy:setup
  * executing `deploy:setup'
  * executing "sudo -p 'sudo password: ' mkdir -p /var/www/apps/sample_app /var/www/apps/sample_app
 /releases /var/www/apps/sample_app/shared /var/www/apps/sample_app/shared/system /var/www     
/apps/sample_app/shared/log /var/www/apps/sample_app/shared/pids"
    servers: ["ec2-20-21-42-51.compute-1.amazonaws.com"]
Password: 
connection failed for: ec2-20-21-42-51.compute-1.amazonaws.com 
(Net::SSH::AuthenticationFailed: ubuntu)

deploy.rb

# The name of your app
set :application, "sample_app"

# The directory on the EC2 node that will be deployed to
set :deploy_to, "/var/www/apps/#{application}"

set :keep_releases, 3

# deploy with git
set :scm, :git
set :repository,  "git@github.com:username/sample_app.git"
set :git_shallow_clone, 1
set :branch, "master"
set :use_sudo, true

set :user, "ubuntu"
ssh_options[:forward_agent] = true
default_run_options[:pty] = true

# The address of the remote host on EC2 (the Public DNS address)
set :location, "ec2-20-21-42-51.compute-1.amazonaws.com"

# setup some Capistrano roles
role :app, location
role :web, location
role :db,  location, :primary => true

after 'deploy:update_code', 'deploy:symlink_db'


namespace :deploy do

desc "Restart Application"
task :restart, :roles => :app do
run "touch #{deploy_to}/#{shared_dir}/tmp/restart.txt"
end

desc "Symlinks the database.yml"
task :symlink_db, :roles => :app do
run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"
end

end

database.yml

development:
  adapter: mysql2
  database: db/development.mysql2
  pool: 5
  timeout: 5000
  database: sample_app
  username: root
  socket: /tmp/mysql.sock

test:
  adapter: mysql2
  database: db/test.mysql2
  pool: 5
  timeout: 5000
  database: sample_app
  username: root
  socket: /tmp/mysql.sock

production:
  adapter: mysql2
  database: db/production.mysql2
  pool: 5
  timeout: 5000
  database: sample_app
  username: ubuntu
  socket: /var/run/mysqld/mysqld.sock
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:21:28+00:00Added an answer on June 4, 2026 at 11:21 am

    For Capistrano v2

    Specify the location of your pem file

    ssh_options[:keys] = ["/where/ever/it/is/key.pem"]
    

    For Capistrano v3
    ssh_options have changed slightly, but basic settings are pretty much same.

    set :ssh_options, {
      keys: %w(/where/ever/it/is/key.pem),
      forward_agent: false,
      user: 'ubuntu'
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

getting errors when trying to write into a SQL database using the 2 following
Getting started with NHibernate How can I generate identity fields in nHibernate using Hilo
getting error while try to start service
I'm trying to deploy my rails application by using Passenger and Capistrano on Dreamhost.
Getting these error when I run the android application: Instead of getting the statuses
Getting started with python. I am trying to implement positional index using nested dictionary.
Getting Fatal Error while running bin/hadoop namenode -format Using Windows 7 operating system, Under
getting a no method error while using clearance for authentication, i was trying to
Getting following error message when I try to fetch JSON response into my app.
Getting very annoyed with this simple query... I need to add an offset to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.