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

tugboat create with options is not picking up default ssh key #234

Closed
tribou opened this issue Feb 14, 2016 · 8 comments
Closed

tugboat create with options is not picking up default ssh key #234

tribou opened this issue Feb 14, 2016 · 8 comments

Comments

@tribou
Copy link

tribou commented Feb 14, 2016

Tugboat 2.2.0

After new tugboat installation, I encountered this:

> tugboat create dev -s 4gb -i docker -r nyc3
Queueing creation of droplet 'dev'.../Users/user/.rvm/gems/ruby-2.2.1/gems/tugboat-2.2.0/lib/tugboat/middleware/create_droplet.rb:50:in `call': undefined method `split' for nil:NilClass (NoMethodError)

My ~/.tugboat file has the following entry (access_token redacted):

ssh:
  ssh_user: root
  ssh_key_path: "~/.ssh/id_rsa"
  ssh_port: '22'
defaults:
  region: nyc3
  image: dokku
  size: 512mb
  ssh_key: 1690771
  private_networking: 'false'
  backups_enabled: 'false'
  ip6: 'false'

However, when I manually specify the key with the -k ####### param, it works.

@petems
Copy link
Owner

petems commented Feb 14, 2016

Can you try with ssh_key: ['1690771']?

I think I need to fix up that logic because it assumes it's an array...

@tribou
Copy link
Author

tribou commented Feb 14, 2016

Now the error is this:

Queueing creation of droplet 'dev2'.../Users/user/.rvm/gems/ruby-2.2.1/gems/tugboat-2.2.0/lib/tugboat/middleware/create_droplet.rb:50:in `call': undefined method `split' for ["1690771"]:Array (NoMethodError)

@petems
Copy link
Owner

petems commented Feb 15, 2016

Hi @tribou!

Can you checkout this repo and try creating a droplet on the fix_ssh_key_array_from_config branch?

I think I've fixed it there, and added a PR to make the change and update the docs: #235, #236

After that I'll push out the update as Tugboat 2.2.1 (bugfix)

@petems
Copy link
Owner

petems commented Feb 16, 2016

This should be fixed in v2.2.1, can you check for me @tribou?

@tribou
Copy link
Author

tribou commented Feb 16, 2016

Here's what I found with v2.2.1:

ssh_key: 1234567      #fails
ssh_key: '1234567'    #works
ssh_key: ['1234567']  #works

I didn't go through the authorize process again, but I assume it populates one of the latter two ssh_key entries now?

@petems
Copy link
Owner

petems commented Feb 16, 2016

I need to double check the authorize process. But I should probably put in a to_s fix so people can user plain numbers...

@petems
Copy link
Owner

petems commented Feb 16, 2016

Fix for fixnum in #240

@petems
Copy link
Owner

petems commented Feb 16, 2016

Fix for authorize prompting to be given an array: #241

@petems petems closed this as completed Jul 14, 2016
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

2 participants