Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH Key RbNaCl::LengthError pulling db #510

Closed
tillmariajuergens opened this issue Jan 30, 2019 · 14 comments
Closed

SSH Key RbNaCl::LengthError pulling db #510

tillmariajuergens opened this issue Jan 30, 2019 · 14 comments

Comments

@tillmariajuergens
Copy link

I have a problem while executing wordmove pull -d via SSH.

First I got, after trying to connect to remote:

Traceback (most recent call last):
	34: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/ruby_executable_hooks:24:in `<main>'
	33: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/ruby_executable_hooks:24:in `eval'
	32: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/wordmove:23:in `<main>'
	31: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/wordmove:23:in `load'
	30: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/exe/wordmove:6:in `<top (required)>'
	29: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
	28: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	27: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	26: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	25: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:78:in `pull'
	24: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `handle_options'
	23: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `each'
	22: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:42:in `block in handle_options'
	21: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:79:in `block in pull'
	20: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:48:in `pull_db'
	19: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:34:in `adapt_remote_db!'
	18: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:79:in `download_remote_db'
	17: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:66:in `remote_run'
	16: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:42:in `exec!'
	15: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:69:in `session'
	14: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh.rb:241:in `start'
	13: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `authenticate'
	12: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `each'
	11: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:80:in `block in authenticate'
	10: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
	 9: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each_identity'
	 8: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each'
	 7: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:122:in `block in each_identity'
	 6: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:20:in `block in authenticate'
	 5: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:62:in `authenticate_with'
	 4: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:142:in `sign'
	 3: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:43:in `load_private_key'
	 2: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:52:in `load_data_private_key'
	 1: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:112:in `classify_key'
/Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:19:in `raiseUnlessLoaded': OpenSSH keys only supported if ED25519 is available (NotImplementedError)
net-ssh requires the following gems for ed25519 support:
 * rbnacl (>= 3.2, < 5.0)
 * rbnacl-libsodium, if your system doesn't have libsodium installed.
 * bcrypt_pbkdf (>= 1.0, < 2.0)
See https://github.com/net-ssh/net-ssh/issues/478 for more information
Gem::MissingSpecError : "Could not find 'rbnacl' (>= 3.2.0, < 5.0) among 64 total gem(s)
Checked in 'GEM_PATH=/Users/Till/.rvm/gems/ruby-2.6.0-latest:/Users/Till/.rvm/rubies/ruby-2.6.0-latest/lib/ruby/gems/2.6.0', execute `gem env` for more information"

Then i installed:

brew install libsodium
gem install rbnacl -v 3.2.0
gem install bcrypt_pbkdf -v 1.0

after this i got:

Traceback (most recent call last):
	40: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/ruby_executable_hooks:24:in `<main>'
	39: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/ruby_executable_hooks:24:in `eval'
	38: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/wordmove:23:in `<main>'
	37: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/bin/wordmove:23:in `load'
	36: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/exe/wordmove:6:in `<top (required)>'
	35: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
	34: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	33: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	32: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	31: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:78:in `pull'
	30: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `handle_options'
	29: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `each'
	28: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:42:in `block in handle_options'
	27: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/cli.rb:79:in `block in pull'
	26: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:48:in `pull_db'
	25: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:34:in `adapt_remote_db!'
	24: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:79:in `download_remote_db'
	23: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:66:in `remote_run'
	22: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:42:in `exec!'
	21: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:69:in `session'
	20: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh.rb:241:in `start'
	19: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `authenticate'
	18: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `each'
	17: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:80:in `block in authenticate'
	16: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
	15: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each_identity'
	14: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each'
	13: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:122:in `block in each_identity'
	12: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:20:in `block in authenticate'
	11: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:62:in `authenticate_with'
	10: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:142:in `sign'
	 9: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:43:in `load_private_key'
	 8: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:60:in `load_data_private_key'
	 7: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:113:in `block in classify_key'
	 6: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:152:in `read'
	 5: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:152:in `new'
	 4: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:128:in `initialize'
	 3: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:128:in `new'
	 2: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:25:in `initialize'
	 1: from /Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:25:in `new'
/Users/Till/.rvm/gems/ruby-2.6.0-latest/gems/rbnacl-3.2.0/lib/rbnacl/signatures/ed25519/verify_key.rb:31:in `initialize': key was 257 bytes (Expected 32) (RbNaCl::LengthError)

And now, i don't know what to do...

The rest worked fine, i could pull all files without any problems with
wordmove pull --all

I'm working on
OSX 10.14.2
Ruby 2.6.0
wordmove 4.0.0

Any idea how to solve this?

PS: thank you very much for your work. Wordmove helps me a lot!

@alessandro-fazzi
Copy link
Member

Hey there,

PS: thank you very much for your work. Wordmove helps me a lot!

you can't imagine how much we're glad to hear that!

That said: first thing first I'd ask to try out w/ the latest 2.5.x ruby version, since I've not yet set up the CI for ruby 2.6 neither I've tried the gem with the shiny new ruby version. Before troubleshooting, I'd like to be sure that you reproduce the same problem with 2.5.

Woudl you like to give it a try?

@tillmariajuergens
Copy link
Author

Hey,
thanks for your answer.

I downgraded it to Ruby 2.5.0 and get unfortunately the same result:

Traceback (most recent call last):
	40: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `<main>'
	39: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `eval'
	38: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/wordmove:23:in `<main>'
	37: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/wordmove:23:in `load'
	36: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/exe/wordmove:6:in `<top (required)>'
	35: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
	34: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	33: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	32: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	31: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:78:in `pull'
	30: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `handle_options'
	29: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `each'
	28: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:42:in `block in handle_options'
	27: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:79:in `block in pull'
	26: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:48:in `pull_db'
	25: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:34:in `adapt_remote_db!'
	24: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:79:in `download_remote_db'
	23: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:66:in `remote_run'
	22: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:42:in `exec!'
	21: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:69:in `session'
	20: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh.rb:241:in `start'
	19: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `authenticate'
	18: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `each'
	17: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:80:in `block in authenticate'
	16: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
	15: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each_identity'
	14: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each'
	13: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:122:in `block in each_identity'
	12: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:20:in `block in authenticate'
	11: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:62:in `authenticate_with'
	10: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:142:in `sign'
	 9: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:43:in `load_private_key'
	 8: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:60:in `load_data_private_key'
	 7: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:113:in `block in classify_key'
	 6: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:152:in `read'
	 5: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:152:in `new'
	 4: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:128:in `initialize'
	 3: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:128:in `new'
	 2: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:25:in `initialize'
	 1: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:25:in `new'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/rbnacl-3.2.0/lib/rbnacl/signatures/ed25519/verify_key.rb:31:in `initialize': key was 257 bytes (Expected 32) (RbNaCl::LengthError)

I created a normal RSA key. Or is a ed25519 key necessary?

@tillmariajuergens
Copy link
Author

fyi: same result with Ruby 2.4.2.

@tillmariajuergens
Copy link
Author

an update: i generated an ed25519 key.
now the connection to remote works and i can pull all db data to my local db.

but...
i ran immediately into another problem.
it seems wp search-replace is not working:

local | adapt dump for vhost
    local | wp search-replace https://xxxxxxxxx.xxx http://localhost:8888/xxxxxxxx/dev/ --quiet --skip-columns=guid --all-tables --allow-root
Traceback (most recent call last):
	16: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `<main>'
	15: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `eval'
	14: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/wordmove:23:in `<main>'
	13: from /Users/Till/.rvm/gems/ruby-2.5.0/bin/wordmove:23:in `load'
	12: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/exe/wordmove:6:in `<top (required)>'
	11: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
	10: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	 9: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	 8: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	 7: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:78:in `pull'
	 6: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `handle_options'
	 5: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:41:in `each'
	 4: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:42:in `block in handle_options'
	 3: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/cli.rb:79:in `block in pull'
	 2: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh.rb:48:in `pull_db'
	 1: from /Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb:37:in `adapt_remote_db!'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove/deployer/base.rb:93:in `run': Return code reports an error (Wordmove::ShellCommandError)

But this is another problem, and this thread can be closed, right?

@alessandro-fazzi
Copy link
Member

alessandro-fazzi commented Feb 2, 2019

@gruenewiese are you using a ed25519 ssh key?

Oh god, nevermind :D you have posted while I was on the page and not noticed your iteration...let me read that :D

@alessandro-fazzi
Copy link
Member

I do not have much knowledge about ed25519 keys, but I know that it is supported out of the box by ruby net-ssh > 5 and our dependency photocopier is declaring ~> 4.1; probably we should update it.

This is the best ref I've found net-ssh/net-ssh#478


About the other error you are getting: could you paste wordmove doctor command's report?

@tillmariajuergens
Copy link
Author

i get this:

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

▬▬ Validating movefile section: global ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | Formal validation passed

▬▬ Validating movefile section: local ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | Formal validation passed

▬▬ Validating movefile section: production ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | Formal validation passed

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

▬▬ Checking local database commands and connection ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | `mysql` command is in $PATH
    ✅  success | `mysqldump` command is in $PATH
    ✅  success | Successfully connected to the MySQL server
    ✅  success | Successfully connected to the database

▬▬ Checking local wp-cli installation ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | wp-cli is correctly installed
    ✅  success | wp-cli is up to date

▬▬ Checking rsync ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | rsync is installed at version 2.6.9

▬▬ Checking SSH client ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ✅  success | SSH command found

but since i have the other key (the connection is working), i get on top of every wordmove echo this:

Thread.exclusive is deprecated, use Thread::Mutex
/Users/Till/.rvm/gems/ruby-2.5.0/gems/rbnacl-3.2.0/lib/rbnacl.rb:88:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519.rb:9:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:8:in `<module:ED25519Loader>'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:5:in `<module:Authentication>'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:1:in `<module:SSH>'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:1:in `<module:Net>'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:1:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/buffer.rb:5:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/transport/algorithms.rb:1:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/transport/session.rb:6:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-ssh-4.2.0/lib/net/ssh.rb:11:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/net-sftp-2.1.2/lib/net/sftp.rb:1:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/photocopier-1.3.2/lib/photocopier.rb:5:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/lib/wordmove.rb:16:in `<top (required)>'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/Till/.rvm/gems/ruby-2.5.0/gems/wordmove-4.0.0/exe/wordmove:5:in `<top (required)>'
/Users/Till/.rvm/gems/ruby-2.5.0/bin/wordmove:23:in `load'
/Users/Till/.rvm/gems/ruby-2.5.0/bin/wordmove:23:in `<main>'
/Users/Till/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `eval'
/Users/Till/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `<main>'

Weird thing is, that after wordmove pull --all even wp help is not working in my dev folder anymore. Before (an empty folder just with movefile and wp-config) and in other places (i installed wp-cli globally) it works.

@tillmariajuergens
Copy link
Author

sorry, always pressing the wrong button by mistake.

@alessandro-fazzi
Copy link
Member

alessandro-fazzi commented Feb 4, 2019

Weird thing is, that after wordmove pull --all even wp help is not working in my dev folder anymore. Before (an empty folder just with movefile and wp-config) and in other places (i installed wp-cli globally) it works.

This sounds "interesting". Do you have wp-config.php exclusion in your movefile.yml in the remote section(s)?

exclude:
    # [...]
    - 'wp-config.php'
    # [...]

@tillmariajuergens
Copy link
Author

tillmariajuergens commented Feb 5, 2019

Do you have wp-config.php exclusion in your movefile.yml in the remote section(s)?

Yes, it is excluded.

But after more tests I have a theory:
I set up a clean wordpress installation on the same remote server and did same things, and it worked.
My wordpress installation of interest is a former multipage. I switched it back to single page a while ago, but without changing the database. So there is still a lot of trash there.
Maybe this caused my problems.
If this is the case I'm very sorry for bothering you with my "personal" problems.

But anyways and for the record: the original problem is now solved with a ed25519 key.

Thank you!

@alessandro-fazzi
Copy link
Member

My wordpress installation of interest is a former multipage. I switched it back to single page a while ago, but without changing the database.

This could require to specify the --url option on wp-cli commands in order to make it work. And we do not support this in wordmove. So...it could be a good catch.

Thanks for your summary. I'm going to close this one, but ping me if you need help.

@TylerBarnes
Copy link

Check this comment out..
net-ssh/net-ssh#478 (comment)

If you generated an ed255.. key, delete it, then add your private ssh key to the ssh agent using add-ssh

ssh-add ~/.ssh/rsa_id

Now it should work.

@TylerBarnes
Copy link

I just added that line to the end of my .zshrc file

@TylerBarnes
Copy link

For anyone else with this issue I ended up needing to add the following to my .zshrc so it didn't add a message to the top of the terminal everytime I open a window (should work the same for .bashrc)

addSSHKey() {
    ssh-add /Users/tylerbarnes/.ssh/id_rsa
}
addSSHKEY &> /dev/null 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants