Skip to content

Doesn't work with Capistrano 3.0.1 #7

@SkyWriter

Description

@SkyWriter

Capistrano 3.0.1

Here's deploy.rb:

require "capistrano/rsync"

set :application, 'auth-backend'
set :repo_url, 'git@red:omg-auth-backend.git'
set :branch, 'master'

set :deploy_to, '/home/cpc-system/apps/auth-backend'
set :scm, :git

set :keep_releases, 5

namespace :deploy do
  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :finishing, 'deploy:cleanup'
end

production.rb is the following:

set :stage, :production
server 'cpc-server', user: 'cpc-system', roles: %w{web app db}
set :rsync_options, %w[--recursive --delete --delete-excluded --exclude .git*]

On a cold deployment outputs the following:

$ be cap production deploy --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke deploy (first_time)
** Execute deploy
** Invoke deploy:starting (first_time)
** Execute deploy:starting
** Invoke deploy:check (first_time)
** Invoke rsync:hook_scm (first_time)
** Execute rsync:hook_scm
** Execute deploy:check
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
 INFO [162b1537] Running /usr/bin/env mkdir -p /tmp/auth-backend/ on cpc-server
DEBUG [162b1537] Command: /usr/bin/env mkdir -p /tmp/auth-backend/
 INFO [162b1537] Finished in 1.023 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/auth-backend/git-ssh.sh 0.0%
 INFO Uploading /tmp/auth-backend/git-ssh.sh 100.0%
 INFO [0648d87e] Running /usr/bin/env chmod +x /tmp/auth-backend/git-ssh.sh on cpc-server
DEBUG [0648d87e] Command: /usr/bin/env chmod +x /tmp/auth-backend/git-ssh.sh
 INFO [0648d87e] Finished in 0.149 seconds with exit status 0 (successful).
** Execute git:check
DEBUG [bc78532f] Running /usr/bin/env git ls-remote git@red:omg-auth-backend.git on cpc-server
DEBUG [bc78532f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/auth-backend/git-ssh.sh /usr/bin/env git ls-remote git@red:omg-auth-backend.git )
DEBUG [bc78532f]    Permission denied (publickey,password).
DEBUG [bc78532f]    fatal: The remote end hung up unexpectedly
DEBUG [bc78532f] Finished in 0.368 seconds with exit status 128 (failed).

It seems like it's trying to do git stuff on a server, which it is not supposed to be doing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions