$ cap production deploy
rvm 1.29.8-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
ruby-2.6.3
ruby 2.6.3p62 (2019-04-16 revision 67580) +JIT [x86_64-linux]
00:00 git:wrapper
01 mkdir -p /tmp
✔ 01 user@example.com 0.470s
Uploading /tmp/git-ssh-app-production-user.sh 100.0%
02 chmod 700 /tmp/git-ssh-app-production-user.sh
✔ 02 user@example.com 0.455s
00:02 git:check
01 git ls-remote git@github.com:user/repo.git HEAD
01 bcfd58198a1374c7592bf706f22698621c37af41 HEAD
✔ 01 user@example.com 1.061s
00:03 deploy:check:directories
01 mkdir -p ~/repository/shared ~/repository/releases
✔ 01 user@example.com 0.495s
00:03 deploy:check:linked_dirs
01 mkdir -p ~/repository/shared/log ~/repository/shared/tmp/pids ~/repository/shared/tmp/cache ~/repository/shared/tmp/sockets ~/repository/shared/public/assets
✔ 01 user@example.com 0.454s
00:04 deploy:check:make_linked_dirs
01 mkdir -p ~/repository/shared/config/credentials
✔ 01 user@example.com 0.494s
#<Thread:0x0000000106d31dd0@/Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
10: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
9: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:31:in `run'
8: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
7: from /Users/user/.rvm/gems/ruby-2.6.3/gems/capistrano-3.11.0/lib/capistrano/scm/tasks/git.rake:30:in `block (3 levels) in eval_rakefile'
6: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:85:in `within'
5: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:80:in `execute'
4: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:147:in `create_command_and_execute'
3: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:147:in `tap'
2: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:147:in `block in create_command_and_execute'
1: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/netssh.rb:169:in `execute_command'
/Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/command.rb:97:in `exit_status=': if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 (SSHKit::Command::Failed)
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository'
1: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as user@example.com: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 (SSHKit::Runner::ExecuteError)
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository'
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as user@example.com: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository'
Caused by:
SSHKit::Command::Failed: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository'
Tasks: TOP => git:create_release => git:update => git:clone
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as user@example.com: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written
if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository'
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [0ed379ac] Command: ( export RAILS_ENV="production" RUBYOPT="--enable=jit" ; /usr/bin/env mkdir -p ~/repository/shared ~/repository/releases )
INFO [0ed379ac] Finished in 0.495 seconds with exit status 0 (successful).
INFO [d33df624] Running /usr/bin/env mkdir -p ~/repository/shared/log ~/repository/shared/tmp/pids ~/repository/shared/tmp/cache ~/repository/shared/tmp/sockets ~/repository/shared/public/assets as user@example.com
DEBUG [d33df624] Command: ( export RAILS_ENV="production" RUBYOPT="--enable=jit" ; /usr/bin/env mkdir -p ~/repository/shared/log ~/repository/shared/tmp/pids ~/repository/shared/tmp/cache ~/repository/shared/tmp/sockets ~/repository/shared/public/assets )
INFO [d33df624] Finished in 0.454 seconds with exit status 0 (successful).
INFO [d47260f9] Running /usr/bin/env mkdir -p ~/repository/shared/config/credentials as user@example.com
DEBUG [d47260f9] Command: ( export RAILS_ENV="production" RUBYOPT="--enable=jit" ; /usr/bin/env mkdir -p ~/repository/shared/config/credentials )
INFO [d47260f9] Finished in 0.494 seconds with exit status 0 (successful).
DEBUG [5c4dedd5] Running [ -f ~/repository/shared/config/credentials/production.key ] as user@example.com
DEBUG [5c4dedd5] Command: [ -f ~/repository/shared/config/credentials/production.key ]
DEBUG [5c4dedd5] Finished in 0.451 seconds with exit status 0 (successful).
DEBUG [86e45f5e] Running [ -f ~/repository/current/REVISION ] as user@example.com
DEBUG [86e45f5e] Command: [ -f ~/repository/current/REVISION ]
DEBUG [86e45f5e] Finished in 0.492 seconds with exit status 1 (failed).
DEBUG [63aaec94] Running [ -f ~/repository/repo/HEAD ] as user@example.com
DEBUG [63aaec94] Command: [ -f ~/repository/repo/HEAD ]
DEBUG [63aaec94] Finished in 0.452 seconds with exit status 1 (failed).
DEBUG [ed0d40b3] Running if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi as user@example.com
DEBUG [ed0d40b3] Command: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi
DEBUG [ed0d40b3] Directory does not exist '\~/repository'
$ cap production deploy rvm 1.29.8-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io] ruby-2.6.3 ruby 2.6.3p62 (2019-04-16 revision 67580) +JIT [x86_64-linux] 00:00 git:wrapper 01 mkdir -p /tmp ✔ 01 user@example.com 0.470s Uploading /tmp/git-ssh-app-production-user.sh 100.0% 02 chmod 700 /tmp/git-ssh-app-production-user.sh ✔ 02 user@example.com 0.455s 00:02 git:check 01 git ls-remote git@github.com:user/repo.git HEAD 01 bcfd58198a1374c7592bf706f22698621c37af41 HEAD ✔ 01 user@example.com 1.061s 00:03 deploy:check:directories 01 mkdir -p ~/repository/shared ~/repository/releases ✔ 01 user@example.com 0.495s 00:03 deploy:check:linked_dirs 01 mkdir -p ~/repository/shared/log ~/repository/shared/tmp/pids ~/repository/shared/tmp/cache ~/repository/shared/tmp/sockets ~/repository/shared/public/assets ✔ 01 user@example.com 0.454s 00:04 deploy:check:make_linked_dirs 01 mkdir -p ~/repository/shared/config/credentials ✔ 01 user@example.com 0.494s #<Thread:0x0000000106d31dd0@/Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 10: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 9: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:31:in `run' 8: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec' 7: from /Users/user/.rvm/gems/ruby-2.6.3/gems/capistrano-3.11.0/lib/capistrano/scm/tasks/git.rake:30:in `block (3 levels) in eval_rakefile' 6: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:85:in `within' 5: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:80:in `execute' 4: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:147:in `create_command_and_execute' 3: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:147:in `tap' 2: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/abstract.rb:147:in `block in create_command_and_execute' 1: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/backends/netssh.rb:169:in `execute_command' /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/command.rb:97:in `exit_status=': if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 (SSHKit::Command::Failed) if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository' 1: from /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/user/.rvm/gems/ruby-2.6.3/gems/sshkit-1.19.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as user@example.com: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 (SSHKit::Runner::ExecuteError) if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository' (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as user@example.com: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository' Caused by: SSHKit::Command::Failed: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository' Tasks: TOP => git:create_release => git:update => git:clone (See full trace by running task with --trace) The deploy has failed with an error: Exception while executing as user@example.com: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi exit status: 1 if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stdout: Nothing written if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi stderr: Directory does not exist '\~/repository' ** DEPLOY FAILED ** Refer to log/capistrano.log for details. Here are the last 20 lines: DEBUG [0ed379ac] Command: ( export RAILS_ENV="production" RUBYOPT="--enable=jit" ; /usr/bin/env mkdir -p ~/repository/shared ~/repository/releases ) INFO [0ed379ac] Finished in 0.495 seconds with exit status 0 (successful). INFO [d33df624] Running /usr/bin/env mkdir -p ~/repository/shared/log ~/repository/shared/tmp/pids ~/repository/shared/tmp/cache ~/repository/shared/tmp/sockets ~/repository/shared/public/assets as user@example.com DEBUG [d33df624] Command: ( export RAILS_ENV="production" RUBYOPT="--enable=jit" ; /usr/bin/env mkdir -p ~/repository/shared/log ~/repository/shared/tmp/pids ~/repository/shared/tmp/cache ~/repository/shared/tmp/sockets ~/repository/shared/public/assets ) INFO [d33df624] Finished in 0.454 seconds with exit status 0 (successful). INFO [d47260f9] Running /usr/bin/env mkdir -p ~/repository/shared/config/credentials as user@example.com DEBUG [d47260f9] Command: ( export RAILS_ENV="production" RUBYOPT="--enable=jit" ; /usr/bin/env mkdir -p ~/repository/shared/config/credentials ) INFO [d47260f9] Finished in 0.494 seconds with exit status 0 (successful). DEBUG [5c4dedd5] Running [ -f ~/repository/shared/config/credentials/production.key ] as user@example.com DEBUG [5c4dedd5] Command: [ -f ~/repository/shared/config/credentials/production.key ] DEBUG [5c4dedd5] Finished in 0.451 seconds with exit status 0 (successful). DEBUG [86e45f5e] Running [ -f ~/repository/current/REVISION ] as user@example.com DEBUG [86e45f5e] Command: [ -f ~/repository/current/REVISION ] DEBUG [86e45f5e] Finished in 0.492 seconds with exit status 1 (failed). DEBUG [63aaec94] Running [ -f ~/repository/repo/HEAD ] as user@example.com DEBUG [63aaec94] Command: [ -f ~/repository/repo/HEAD ] DEBUG [63aaec94] Finished in 0.452 seconds with exit status 1 (failed). DEBUG [ed0d40b3] Running if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi as user@example.com DEBUG [ed0d40b3] Command: if test ! -d \~/repository; then echo "Directory does not exist '\~/repository'" 1>&2; false; fi DEBUG [ed0d40b3] Directory does not exist '\~/repository'