welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

SSH Authentication failed for user username@server (Net::SSH::AuthenticationFailed) #348

Closed kevinmamaqi closed 7 years ago

kevinmamaqi commented 8 years ago

I'm trying to set up wordmove properly. I got it installed with VVV using providers (as explained in the documentation), but can't move forward from here.

I am using siteground shared hosting, I got access via SSH from my computer (mac). When I do vagrant ssh I go to the main directory where the Movefile is and then I type wordomove pull -d. Am I missing something? Should I set up SSH access from the vagrant box?

Message received when wordmove pull -t:

▬ ✓ Using Movefile: ./Movefile ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ ✓ Pulling Themes ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
   remote | get_directory: /mypath/wp-content/themes /srv/www/site/htdocs/wp-content/themes .git/ .gitignore .sass-cache/ node_modules/ bin/ tmp/* Gemfile* Movefile wp-config.php wp-content/*.sql
I, [2016-11-01T09:20:19.983671 #10039]  INFO -- : rsync --progress -e 'ssh -p 18765 kevinmam@77.104.141.67' -rlpt --compress --omit-dir-times --delete --exclude .git/ --exclude .gitignore --exclude .sass-cache/ --exclude node_modules/ --exclude bin/ --exclude tmp/\* --exclude Gemfile\* --exclude Movefile --exclude wp-config.php --exclude wp-content/\*.sql :/mypath/wp-content/themes/ /srv/www/site/htdocs/wp-content/themes
receiving file list ...
rsync: link_stat "/mypath/wp-content/themes/." failed: No such file or directory (2)
0 files to consider
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [Receiver=3.1.0]

Message received when wordmove pull -d:

▬▬ ✓ Using Movefile: ./Movefile ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ ✓ Pulling Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    local | mysqldump --host=localhost --user=wp --password=wp --result-file="/srv/www/site/htdocs/wp-content/local-backup-1477992273.sql" DATABASE
gzip --best --force "/srv/www/site/htdocs/wp-content/local-backup-1477992273.sql"
    local | gzip --best --force "/srv/www/site/htdocs/wp-content/local-backup-1477992273.sql"
   remote | mysqldump --host=localhost --user=USERNAME --password=PASSWORD --result-file="/mypath/wp-content/dump.sql" --max_allowed_packet=1G DATABASE
/usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:57:in `remote_run': Error code 1 returned by command "mysqldump --host=localhost --user=USERNAME --password=PASSWORD --result-file="/mypath/wp-content/dump.sql" --max_allowed_packet=1G DATABASE": Warning: Using a password on the command line interface can be insecure. (Wordmove::ShellCommandError)
mysqldump: Can't create/write to file '/mypath/wp-content/dump.sql' (Errcode: 2 - No such file or directory)
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:67:in `download_remote_db'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/deployer/ssh.rb:37:in `pull_db'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:69:in `block in pull'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:37:in `block in handle_options'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:36:in `each'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:36:in `handle_options'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/lib/wordmove/cli.rb:68:in `pull'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /usr/local/rvm/gems/ruby-2.3.0/gems/wordmove-2.0.0/exe/wordmove:6:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.3.0/bin/wordmove:23:in `load'
    from /usr/local/rvm/gems/ruby-2.3.0/bin/wordmove:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
kevinmamaqi commented 8 years ago

Ok so, I've been able to connect, one of the problems was the SSH access. Solved generating rsa keys in vagrant .ssh/ folder. The other one was that I was using /mypath/whatever instead of mypath/whatever, this "/" was the reason for the error.

On the other hand I'm having the issue related with this help page: https://github.com/welaika/wordmove/wiki/invalid-byte-sequence-in-UTF-8-while-pushing---pulling-db

After editing the .profile still have the same problem.

If I manually export and import the database using phpMyAdmin I get the following message:

Error consulta SQL:

CREATE TABLE `wpdb_blc_filters` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `params` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
MySQL ha dicho: Documentación

#1273 - Collation desconocida: 'utf8mb4_unicode_520_ci'

UPDATE

Fix #78 don't work either.

alessandro-fazzi commented 8 years ago

Hi @kevinmamaqi :)

this

Collation desconocida: 'utf8mb4_unicode_520_ci'

is not a problem related to Wordmove: as you noticed you have the same error also using another tool. This happens probably because:

We have same problem on some MediaTemple hosting. The way we manage this, until hosting provider will update his software, is to "downgrade" the collation in the dev env.

Up to you how to do this. In @welaika we wrote a wp-cli's micro-command: https://github.com/welaika/wp-cli-db2utf8

Let we know if you found your way.

Cheers

kevinmamaqi commented 7 years ago

Sorry for the late reply. The problem was that the hosting got a higher version of MySQL. Ended up using All in one wp migration plugin for DB migrations.

Thanks for your help.