welaika / wordmove

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

net-ssh error when database move #662

Open Samuel88 opened 1 year ago

Samuel88 commented 1 year ago

File pushing to production work fine, but when I try to move database from local to production environment command fail with ssh error

wordmove push -d -e production

┌[samuel@uby2204] [/dev/pts/1] [master ⚡] 
└[~/www]> wordmove push -d -e production

    ℹ️  info | Using .env file: ./.env

▬▬ Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ Pushing Database ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

   remote | mysqldump --host=[secret] --user=[secret] --password=[secret] --result-file="[secret]/web/app/dump.sql" [secret]
/var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key!': pkeys are immutable on OpenSSL 3.0 (OpenSSL::PKey::PKeyError)
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/kex/abstract.rb:32:in `initialize'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:437:in `new'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:437:in `exchange_keys'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:245:in `proceed!'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:184:in `accept_kexinit'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:210:in `block in poll_message'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:190:in `loop'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:190:in `poll_message'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:225:in `block in wait'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:223:in `loop'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:223:in `wait'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:90:in `initialize'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `new'
        from /var/lib/gems/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `start'
        from /var/lib/gems/3.0.0/gems/photocopier-1.4.1/lib/photocopier/ssh.rb:71:in `session'
        from /var/lib/gems/3.0.0/gems/photocopier-1.4.1/lib/photocopier/ssh.rb:44:in `exec!'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:66:in `remote_run'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:79:in `download_remote_db'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:6:in `backup_remote_db!'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/deployer/ssh.rb:37:in `push_db'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:116:in `block in push'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:40:in `block in handle_options'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:39:in `each'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:39:in `handle_options'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/lib/wordmove/cli.rb:115:in `push'
        from /var/lib/gems/3.0.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/3.0.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/3.0.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        from /var/lib/gems/3.0.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
        from /var/lib/gems/3.0.0/gems/wordmove-5.2.2/exe/wordmove:6:in `<top (required)>'
        from /usr/local/bin/wordmove:25:in `load'
        from /usr/local/bin/wordmove:25:in `<main>'

My OS is Ubuntu 22.04 LTS Ruby Version is ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]

MaruanBO commented 1 year ago

Please paste the full result and run wordmove doctor and paste here your result. Also could you tell me more about your environmental (docker etc..)

As I can see you are having problems with your ssh, did you tried to run the next commands before pull database?:

eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.