Class: Webbynode::Commands::AuthorizeRoot
- Inherits:
-
Webbynode::Command
- Object
- Webbynode::Command
- Webbynode::Commands::AuthorizeRoot
- Defined in:
- lib/webbynode/commands/authorize_root.rb
Constant Summary
Constants inherited from Webbynode::Command
Webbynode::Command::Aliases, Webbynode::Command::CommandError, Webbynode::Command::InvalidCommand, Webbynode::Command::InvalidOption, Webbynode::Command::Settings
Instance Method Summary collapse
Methods inherited from Webbynode::Command
add_alias, #api, class_for, command, command_class_name, description, for, #gemfile, #git, help, inherited, #initialize, #io, #no?, #notify, option, #option, #options, options_help, #param, #param_values, parameter, #params, #params_hash, params_help, #pushand, #remote_executor, requires_initialization!, requires_options!, requires_pushed_application!, #run, #server, setting, #settings, summary, summary_help, usage, #validate_initialization, #validate_options, #yes?
Constructor Details
This class inherits a constructor from Webbynode::Command
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/webbynode/commands/authorize_root.rb', line 11 def execute server.add_ssh_root_key LocalSshKey, [:passphrase].value io.log "Your local SSH Key has been added to your Webby's root user", :notify rescue Webbynode::InvalidAuthentication io.log "Could not connect to webby: invalid authentication.", true rescue Webbynode::PermissionError io.log "Could not create an SSH key: permission error.", true end |