Guest User

Untitled

a guest
Jan 5th, 2018
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.76 KB | None | 0 0
  1.  
  2. deploy@MyServer:~$ ssh -T [email protected]
  3. debug1: client_input_channel_open: ctype [email protected] rchan 2 win 65536 max 16384
  4. debug1: channel 1: new [authentication agent connection]
  5. debug1: confirm [email protected]
  6. Welcome to GitLab, Alexander!debug1: channel 1: FORCE input drain
  7.  
  8. set :application, "myapp"
  9. set :branch, "master"
  10. set :repo_url, "[email protected]:MyApp/myapp.git"
  11.  
  12. # Defaults to false
  13. # Skip migration if files in db/migrate were not modified
  14. set :conditionally_migrate, true
  15.  
  16. set :ssh_options, { forward_agent: true }
  17.  
  18. set :rvm_ruby_version, '2.2.6'
  19.  
  20. # Default deploy_to directory is /var/www/my_app_name
  21. set :deploy_to, "/var/www/#{fetch(:application)}/"
  22. set :deploy_user, "deploy"
  23.  
  24. # Tells Capistrano to store config/database.yml file inside a directory called /shared, which is meant for any files
  25. # we want to persist between deploys
  26. set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
  27.  
  28. # Directories that are meant to persist between deploys, and they will also be stored inside /shared
  29. set :linked_dirs, fetch(:linked_dirs, []).push('bin', 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
  30.  
  31. # The specs that should be run before deployment is allowed to continue
  32. set :tests, []
  33.  
  34. # Delayed Job Config: https://github.com/AgileConsultingLLC/capistrano3-delayed-job
  35. set :delayed_job_workers, 3
  36.  
  37. # Keep the last 5 deploys for rollback purposes
  38. set :keep_releases, 5
  39.  
  40. namespace :deploy do
  41. after :restart, :clear_cache do
  42. on roles(:web), in: :groups, limit: 3, wait: 10 do
  43. # Here we can do anything such as:
  44. # within release_path do
  45. # execute :rake, 'cache:clear'
  46. # end
  47. end
  48. end
  49. end
  50.  
  51. set :stage, :staging
  52. set :rails_env, :staging
  53.  
  54. role :app, %w{[email protected]}
  55. role :web, %w{[email protected]}
  56. role :db, %w{[email protected]}
  57.  
  58. $ bundle exec cap staging deploy --trace
  59. ** Invoke staging (first_time)
  60. ** Execute staging
  61. ** Invoke load:defaults (first_time)
  62. ** Execute load:defaults
  63. ** Invoke rvm:hook (first_time)
  64. ** Invoke passenger:rvm:hook (first_time)
  65. ** Invoke passenger:test_which_passenger (first_time)
  66. ** Execute passenger:test_which_passenger
  67. ** Execute passenger:rvm:hook
  68. ** Execute rvm:hook
  69. ** Invoke rvm:check (first_time)
  70. ** Execute rvm:check
  71. rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
  72. ruby-2.2.6
  73. ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux]
  74. ** Invoke bundler:map_bins (first_time)
  75. ** Invoke passenger:bundler:hook (first_time)
  76. ** Execute passenger:bundler:hook
  77. ** Execute bundler:map_bins
  78. ** Invoke deploy:set_rails_env (first_time)
  79. ** Execute deploy:set_rails_env
  80. ** Invoke deploy:set_linked_dirs (first_time)
  81. ** Execute deploy:set_linked_dirs
  82. ** Invoke deploy:set_rails_env
  83. ** Invoke deploy (first_time)
  84. ** Execute deploy
  85. ** Invoke deploy:starting (first_time)
  86. ** Execute deploy:starting
  87. ** Invoke deploy:check (first_time)
  88. ** Invoke git:check (first_time)
  89. ** Invoke git:wrapper (first_time)
  90. ** Execute git:wrapper
  91. 00:00 git:wrapper
  92. 01 mkdir -p /tmp
  93. ✔ 01 [email protected] 0.286s
  94. Uploading /tmp/git-ssh-myapp-staging-localuser.sh 100.0%
  95. 02 chmod 700 /tmp/git-ssh-myapp-staging-localuser.sh
  96. ✔ 02 [email protected] 0.277s
  97. ** Execute git:check
  98. 00:01 git:check
  99. 01 git ls-remote [email protected]:MyApp/myapp.git HEAD
  100. 01 Permission denied (publickey).
  101. 01 fatal: Could not read from remote repository.
  102. 01
  103. 01 Please make sure you have the correct access rights
  104. 01 and the repository exists.
  105. cap aborted!
  106. SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: git exit status: 128
  107. git stdout: Nothing written
  108. git stderr: Permission denied (publickey).
  109. fatal: Could not read from remote repository.
  110.  
  111. Please make sure you have the correct access rights
  112. and the repository exists.
  113. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
  114. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
  115.  
  116. Caused by:
  117. SSHKit::Command::Failed: git exit status: 128
  118. git stdout: Nothing written
  119. git stderr: Permission denied (publickey).
  120. fatal: Could not read from remote repository.
  121.  
  122. Please make sure you have the correct access rights
  123. and the repository exists.
  124. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/command.rb:99:in `exit_status='
  125. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/netssh.rb:169:in `execute_command'
  126. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
  127. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:141:in `tap'
  128. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
  129. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:74:in `execute'
  130. C:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.10.1/lib/capistrano/scm/git.rb:77:in `git'
  131. C:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.10.1/lib/capistrano/scm/git.rb:38:in `check_repo_is_reachable'
  132. C:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.10.1/lib/capistrano/scm/tasks/git.rake:19:in `block (4 levels) in eval_rakefile'
  133. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:93:in `with'
  134. C:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.10.1/lib/capistrano/scm/tasks/git.rake:18:in `block (3 levels) in eval_rakefile'
  135. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
  136. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:29:in `run'
  137. C:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.15.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
  138. Tasks: TOP => deploy:check => git:check
  139. The deploy has failed with an error: Exception while executing as [email protected]: git exit status: 128
  140. git stdout: Nothing written
  141. git stderr: Permission denied (publickey).
  142. fatal: Could not read from remote repository.
  143.  
  144. Please make sure you have the correct access rights
  145. and the repository exists.
  146. ** Invoke deploy:failed (first_time)
  147. ** Execute deploy:failed
  148.  
  149.  
  150. ** DEPLOY FAILED
  151. ** Refer to log/capistrano.log for details. Here are the last 20 lines:
  152.  
  153.  
  154. DEBUG [6b6ba2d0] Finished in 0.471 seconds with exit status 0 (successful).
  155.  
  156. DEBUG [c6e2d7dc] Running ~/.rvm/bin/rvm 2.2.6 do ruby --version as [email protected]
  157.  
  158. DEBUG [c6e2d7dc] Command: ~/.rvm/bin/rvm 2.2.6 do ruby --version
  159.  
  160. DEBUG [c6e2d7dc] ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux]
  161.  
  162. DEBUG [c6e2d7dc] Finished in 0.608 seconds with exit status 0 (successful).
  163.  
  164. INFO [fd5500a8] Running /usr/bin/env mkdir -p /tmp as [email protected]
  165.  
  166. DEBUG [fd5500a8] Command: /usr/bin/env mkdir -p /tmp
  167.  
  168. INFO [fd5500a8] Finished in 0.286 seconds with exit status 0 (successful).
  169.  
  170. DEBUG Uploading /tmp/git-ssh-myapp-staging-localuser.sh 0.0%
  171.  
  172. INFO Uploading /tmp/git-ssh-myapp-staging-localuser.sh 100.0%
  173.  
  174. INFO [f33d4873] Running /usr/bin/env chmod 700 /tmp/git-ssh-myapp-staging-localuser.sh as [email protected]
  175.  
  176. DEBUG [f33d4873] Command: /usr/bin/env chmod 700 /tmp/git-ssh-myapp-staging-localuser.sh
  177.  
  178. INFO [f33d4873] Finished in 0.277 seconds with exit status 0 (successful).
  179.  
  180. INFO [86d3cd5a] Running /usr/bin/env git ls-remote [email protected]:MyApp/myapp.git HEAD as [email protected]
  181.  
  182. DEBUG [86d3cd5a] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-myapp-staging-localuser.sh" ; /usr/bin/env git ls-remote [email protected]:MyApp/myapp.git HEAD )
  183.  
  184. DEBUG [86d3cd5a] Permission denied (publickey).
  185.  
  186. DEBUG [86d3cd5a] fatal: Could not read from remote repository.
  187.  
  188.  
  189.  
  190. Please make sure you have the correct access rights
  191.  
  192. and the repository exists.
Add Comment
Please, Sign In to add comment