Closed cibulka closed 9 years ago
This issue already popped of here: https://github.com/lavmeiker/capistrano-wpcli/issues/14.
set :wpcli_rsync_options, '-avz -e "ssh -p <port number>"' in your deploy/(env).rb file
I will make sure that we get something like this into the documentation.
Closing as duplicate of https://github.com/lavmeiker/capistrano-wpcli/issues/14.
My bad, thanks! Quick question though: When I tried to update this gem to its latest version (meeting the LUX milestone?) by running bundle update
, I keep getting version 0.0.9
. Any idea what I might be doing wrong?
Here's what I've tried to add to my gemfile:
gem 'capistrano-wpcli'
gem 'capistrano-wpcli', "~> 0.1.1" # => Could not find gem 'capistrano-wpcli (~> 0.1.1) ruby' in the gems available on this machine.
gem 'capistrano-wpcli', :git => 'https://github.com/davestevens/capistrano-wpcli'
Hi @cibulka!
Rsync ports are integrated now by the way. =)
The problem right now is that @lavmeiker somehow is not responding and i am currently not allowed to push a new version of the gem. I will again try to reach him so he can publish the new versions.
gem 'capistrano-wpcli', :git => 'git@github.com:lavmeiker/capistrano-wpcli.git'
Like this you should get the newest version.
You answer quickly!
Here's what has worked for me:
gem 'capistrano-wpcli', :git => 'https://github.com/lavmeiker/capistrano-wpcli.git'
git@github.com:lavmeiker/capistrano-wpcli.git
threw error Could not read from remote repository
for some reason.
Thank you!
Weirdly enough, the problem persists even with capistrano-wpcli 0.1.1.
Using capistrano-wpcli 0.1.1 from https://github.com/lavmeiker/capistrano-wpcli.git (at master)
Here's the output:
INFO [41771153] Running /usr/bin/env rsync -avz --rsh=ssh web720@81.91.83.149:/www/itvar.cz/wwwroot/www/shared/web/app/uploads/ web/app/uploads/ as Cibulka@localhost
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Command::Failed: rsync exit status: 65280
rsync stdout: Nothing written
rsync stderr: ssh: connect to host 81.91.83.149 port 22: Operation timed out
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [receiver=2.6.9]
Tasks: TOP => wpcli:uploads:rsync:pull
(See full trace by running task with --trace)
I have this in my configuration (deploy.rb, environments/staging.rb, environments/production.rb to be safe):
set :wpcli_rsync_port, 2222
What am I doing wrong? Thanks again!
Ill have a look right away.
Opened new issue for this here: https://github.com/lavmeiker/capistrano-wpcli/issues/30
It works now. =)
See the updated documentation.
Sorry, but it does not for me. :(
| => bundle exec cap production wpcli:uploads:rsync:pull
INFO [29d88580] Running /usr/bin/env rsync -avz --rsh=ssh --progress web720@81.91.83.149:/www/itvar.cz/wwwroot/www/shared/web/app/uploads/ web/app/uploads/ as Cibulka@localhost
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Command::Failed: rsync exit status: 65280
rsync stdout: Nothing written
rsync stderr: ssh: connect to host 81.91.83.149 port 22: Operation timed out
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [receiver=2.6.9]
Tasks: TOP => wpcli:uploads:rsync:pull
(See full trace by running task with --trace)
My deploy/production.rb
file:
set :stage, :production
# Simple Role Syntax
# ==================
#role :app, %w{deploy@example.com}
#role :web, %w{deploy@example.com}
#role :db, %w{deploy@example.com}
# Extended Server Syntax
# ======================
server '81.91.83.149', user: 'web720', roles: %w{web app db}
set :ssh_options, {
keys: ['~/.ssh/id_rsa'],
port: 2222
}
set :tmp_dir, '/home/web720/capistrano-tmp'
set :deploy_to, -> { "/www/itvar.cz/wwwroot/www" }
SSHKit.config.command_map[:composer] = "/home/web720/composer.phar"
SSHKit.config.command_map[:wp] = "/home/web720/wp-cli.phar"
set :default_env, {
path: [
"/home/web720",
"$PATH"
].join(":")
}
set :wpcli_remote_url, '//itvar.cz'
set :wpcli_local_url, '//itvar.dev'
fetch(:default_env).merge!(wp_env: :production)
My gemfile (relevant parts):
source 'https://rubygems.org'
gem 'capistrano'
gem 'capistrano-composer'
gem 'colorize'
gem 'capistrano-upload-config'
gem 'capistrano-env-config'
gem 'capistrano-wpcli', :git => 'https://github.com/lavmeiker/capistrano-wpcli.git'
Any ideas? Thanks!
Hello again!
making this gem work is a little challenging for me, as I use shared hosting with some extra security layers. Here's my first issue:
I assume that this error is pops up because my host requires port 2222 for SSH connections. I have this specified inside my
deploy.rb
config file like this -Capistrano-wpcli
use a port number of my config? Thanks!