I tried to set up a simple capistrano deployment, and get the following error when deploying:
SSHKit::Runner::ExecuteError: Exception while executing as
us...@server.com: SCP did not finish successfully (126):
Net::SCP::Error: SCP did not finish successfully (126):
I do not want Cap to use SCP as my provider does not allow it. There should be a possibility to change this setting to SFTP but I cannot find any info about where to change it.
I am using a GIT repository for deployment, so Cap should not upload any files, just execute som ssh commands to create some directories and download the repository from git.
Any idea how to set this up?
My production.rb only contains a line similar to this:
`role:web,%w[us...@server.com:10022]`
My deploy.rb similar to this:
# config valid only for current version of Capistrano
lock '3.4.0'
set :application, 'My App'
set :repo_url, 'g...@gitlab.com.....'
# Default branch is :master
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, '/home/user/cap'
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
end
end
end
Thanks