TritonDataCenter / node-triton

Triton client tool and node.js library
57 stars 39 forks source link

Installation in Ubuntu 14.04 with Node 7.0 - profile create outputs assert error #206

Open mechastorm opened 7 years ago

mechastorm commented 7 years ago

Fresh ubuntu 14.04 installation on a vagrant machine.

After installation when I run triton profile create, I get

assert.js:81
  throw new assert.AssertionError({
  ^
AssertionError: 'fail' == 'pending'
    at /usr/lib/node_modules/triton/node_modules/smartdc-auth/node_modules/vasync/lib/vasync.js:62:15
    at /usr/lib/node_modules/triton/node_modules/smartdc-auth/lib/keyring.js:120:4
    at /usr/lib/node_modules/triton/node_modules/smartdc-auth/lib/kr-homedir.js:82:3
    at /usr/lib/node_modules/triton/node_modules/smartdc-auth/node_modules/vasync/lib/vasync.js:81:5
    at /usr/lib/node_modules/triton/node_modules/smartdc-auth/lib/kr-homedir.js:247:6
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:439:3)

Any ideas what could be the cause?

This is for Triton CLI 5.2.0 My node version

vagrant@sliong:~$ node -v
v7.10.0
vagrant@sliong:~$ npm -v
4.2.0

My Instalaltion process

sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install nodejs
sudo npm install -g triton
mechastorm commented 7 years ago

I think I found the cause of the issue. I have a passphrase protected ssh key as .ssh/id_rsa. Once I removed that key, it seems to work fine now.

After further down the installation it did mention that passphrase protected ssh keys are not supported.

I still do not know why triton will crash when trying to read a passphrase protected ssh key. I am leaving this issue as a possible improvement would for Triton CLI to support passphrase protected ssh keys or to skip that key if it detects that it is passphrase protected.