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

Net:SSH AuthenticationFailed on remote mysqldump after rsync finished successfully #671

Open kLOsk opened 1 year ago

kLOsk commented 1 year ago

Describe the bug

I'm also seeing the issue described here now. Local Mac environment is running MAMP 6.8 MySQL 5.7.39 Remote environment is Running Ubuntu 22.0.4.1 LTS MySQL 8 Open SSL installed via homebrew openssl@3/3.1.3 Remote uses 3.0.2-0ubuntu1.10 amd64

Is there any way that we can try using net-ssh.rb ver 7.1/7.2 @alessandro-fazzi @delphaber ? I tried to update the gems but have no clue about Ruby and couldn't not locate the gemfile that defines the net-ssh version being required by wordmove. Would be much appreciated, to either solve this, or find a workaround.

Exception/trace

 remote | mysqldump --host=[secret] --user=[secret] --password=[secret] --result-file="[secret]/wp-content/dump.sql" dbname
Traceback (most recent call last):
20: from /Users/klos/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in  '
' 19: from /Users/klos/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in eval' 18: from /Users/klos/.rvm/gems/ruby-2.6.3/bin/wordmove:23:in
' 17: from /Users/klos/.rvm/gems/ruby-2.6.3/bin/wordmove:23:in load' 16: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/exe/wordmove:6:in<top (required)>' 15: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/base.rb:466:in start' 14: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor.rb:387:indispatch' 13: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command' 12: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/command.rb:27:inrun' 11: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/cli.rb:115:in push' 10: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/cli.rb:39:inhandle_options' 9: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/cli.rb:39:in each' 8: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/cli.rb:40:inblock in handle_options' 7: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/cli.rb:116:in block in push' 6: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:37:inpush_db' 5: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:6:in backup_remote_db!' 4: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:79:indownload_remote_db' 3: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:66:in remote_run' 2: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/photocopier-1.4.1/lib/photocopier/ssh.rb:44:inexec!' 1: from /Users/klos/.rvm/gems/ruby-2.6.3/gems/photocopier-1.4.1/lib/photocopier/ssh.rb:71:in session' /Users/klos/.rvm/gems/ruby-2.6.3/gems/net-ssh-6.1.0/lib/net/ssh.rb:268:instart': Authentication failed for user user@ip (Net::SSH::AuthenticationFailed)

Environment (please complete the following information):

Doctor

bernhardmostrey commented 9 months ago

Any updates on this? Having the same issue. Only on DigitalOcean servers.

smilingpeanut commented 8 months ago

Runing into the same problem with Sonona 14.3.1, Ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23], and Wordmove 5.2.2.

bernhardmostrey commented 8 months ago

Finally got it working by enabling password auth in the ssh settings of the server. I was using DigitalOcean, so you need to change the settings in two places.

kLOsk commented 1 month ago

Guys, I built a script that uses the movefile to push and pull databases to/from environments. So Its plug and play, simply use the new command when you want to push / pull a db from a wordpress site that was previously using wordmove

https://github.com/kLOsk/WP-DBSync