Consul: Capistrano deployment requires ed25519 gem

Created on 10 Feb 2019  路  3Comments  路  Source: consul/consul

Description

Type: Bug

Current Behavior

Not sure why but I started to get the following error message when trying to deploy using capistrano:

00:00 rvm1:hook
      01 mkdir -p /home/deploy/consul/rvm1scripts/
(Backtrace restricted to imported tasks)
cap aborted!
NotImplementedError: OpenSSH keys only supported if ED25519 is available
net-ssh requires the following gems for ed25519 support:
 * ed25519 (>= 1.2, < 2.0)
 * bcrypt_pbkdf (>= 1.0, < 2.0)
See https://github.com/net-ssh/net-ssh/issues/565 for more information
Gem::LoadError : "Could not find 'ed25519' (~> 1.2) among 234 total gem(s)
Checked in 'GEM_PATH=/Users/admin/.gem/ruby/2.3.0:/Users/admin/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0', execute `gem env` for more information"

Tasks: TOP => rvm1:hook

Adding the two gems fixes it:

gem 'ed25519', '~> 1.2'
gem 'bcrypt_pbkdf', '~> 1'

And then I get the following error message:

00:00 rvm1:hook
      01 mkdir -p /home/deploy/consul/rvm1scripts/
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: expected 64-byte String, got 3


Caused by:
ArgumentError: expected 64-byte String, got 3

Tasks: TOP => rvm1:hook

Which I fix by updating net-ssh to 5.1.0 (by default, it's at 5.0.2).

It's the first time I get this while using Capistrano to deploy to a Ubuntu 16.04 machine. I've always been using OpenSSH until now, without an issue.

Steps to reproduce

Follow the Capistrano deployment guide until you reach the command cap production deploy

Anyone has encountered this before? It seems to be a common issue.

Most helpful comment

On Mac OS, you need to run:
ssh-add [yourkey]

All 3 comments

I don't know why but this one seems fixed with v1.0.0.

Hi @PierreMesure, i started to get same error today, and then googling a little bit found https://github.com/net-ssh/net-ssh/issues/478#issuecomment-275113659 which solved the issue for me.

On Mac OS, you need to run:
ssh-add [yourkey]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

voodoorai2000 picture voodoorai2000  路  6Comments

bertocq picture bertocq  路  7Comments

decabeza picture decabeza  路  4Comments

decabeza picture decabeza  路  4Comments

decabeza picture decabeza  路  4Comments