mattray / inspec-iggy

InSpec CLI plugin for generating compliance controls from Terraform and CloudFormation
Apache License 2.0
106 stars 18 forks source link

Unable to install plugin with inspec 4.7.3 #26

Closed pcanham closed 4 years ago

pcanham commented 5 years ago

Describe the bug Unable to install the plugin on my Macbook, get a generic error saying it failed.

Environment OS: MacOS 10.14.5 Inspec: 4.7.3 InSpec-Iggy: 0.5.0

To Reproduce install dmg from Chef then run from iterm2 inspec plugin install inspec-iggy

Expected behavior plugin to install successfully

Additional context Here is the debug output

inspec plugin install inspec-iggy --log-level=debug
[2019-07-15T16:18:50+01:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-supermarket': an existing plugin with that name was loaded via bundle-loading from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/bundles/inspec-supermarket.rb
[2019-07-15T16:18:50+01:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-plugin-manager-cli': an existing plugin with that name was loaded via core-loading from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli.rb
[2019-07-15T16:18:50+01:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-artifact': an existing plugin with that name was loaded via core-loading from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-artifact/lib/inspec-artifact.rb
[2019-07-15T16:18:50+01:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-habitat': an existing plugin with that name was loaded via core-loading from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-habitat/lib/inspec-habitat.rb
[2019-07-15T16:18:50+01:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-init': an existing plugin with that name was loaded via core-loading from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-init/lib/inspec-init.rb
[2019-07-15T16:18:50+01:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-compliance': an existing plugin with that name was loaded via core-loading from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-compliance/lib/inspec-compliance.rb
Traceback (most recent call last):
    22: from /usr/local/bin/inspec:181:in `<main>'
    21: from /usr/local/bin/inspec:181:in `load'
    20: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.7.3/bin/inspec:11:in `<top (required)>'
    19: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/base_cli.rb:31:in `start'
    18: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
    17: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    16: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    15: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    14: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
    13: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
    12: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    11: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    10: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     9: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:100:in `install'
     8: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:322:in `install_from_remote_gem'
     7: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:364:in `install_attempt_install'
     6: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:70:in `install'
     5: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:282:in `install_from_remote_gems'
     4: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:317:in `install_gem_to_plugins_dir'
     3: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:317:in `each'
     2: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:319:in `block in install_gem_to_plugins_dir'
     1: from /opt/inspec/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1414:in `activate'
/opt/inspec/embedded/lib/ruby/2.6.0/rubygems/specification.rb:2292:in `check_version_conflict': can't activate net-scp-1.2.1, already activated net-scp-2.0.0 (Gem::LoadError)
    19: from /usr/local/bin/inspec:181:in `<main>'
    18: from /usr/local/bin/inspec:181:in `load'
    17: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.7.3/bin/inspec:11:in `<top (required)>'
    16: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/base_cli.rb:31:in `start'
    15: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
    14: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    13: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    12: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    11: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
    10: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     9: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     8: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     7: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     6: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:100:in `install'
     5: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:322:in `install_from_remote_gem'
     4: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:364:in `install_attempt_install'
     3: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:70:in `install'
     2: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:282:in `install_from_remote_gems'
     1: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:316:in `install_gem_to_plugins_dir'
/opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.7.3/lib/inspec/plugin/v2/installer.rb:325:in `rescue in install_gem_to_plugins_dir': can't activate net-scp-1.2.1, already activated net-scp-2.0.0 (Inspec::Plugin::V2::InstallError)
clavery-chef commented 5 years ago

could you retry with an explicit version i.e. inspec plugin install -v 0.6.0 inspec-iggy ?

pcanham commented 5 years ago

Hi @clavery-chef just tested this and the installation works all OK, i have done some general patching on my machine so will post the latest versions of MacOS and inspec i have running on the machine

OS: MacOS 10.14.6 Inspec: 4.12.0

inspec plugin install -v 0.6.0 inspec-iggy
Fetching inspec-iggy-0.6.0.gem
inspec-iggy plugin, version 0.6.0, installed from rubygems.org%
clavery-chef commented 5 years ago

Im guessing the Inspec plugin install doesn't like installing without a version its a n open issue/fr - https://github.com/inspec/inspec/issues/4296, feel free to add your +1

mattray commented 4 years ago

Closing.

mattray@clamps[13:11]2.6.5(master*)~
$ inspec plugin install inspec-iggy
Fetching inspec-iggy-0.7.0.gem
inspec-iggy plugin, version 0.7.0, installed from rubygems.org
mattray@clamps[13:12]2.6.5(master*)~
$ inspec iggy version
Iggy v0.7.0
Skumar85 commented 4 years ago

Hi @mattray , I'm trying to install inspec-iggy and i get the below error, can anyone please help me on this as i can see the same error in this issue and its closed.I'm using inspec 4.18.51 $ inspec version 4.18.51

 inspec plugin install inspec-iggy --log-level=debug
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-supermarket': an existing plugin with that name was loaded via bundle-loading from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/bundles/inspec-supermarket.rb
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-plugin-manager-cli': an existing plugin with that name was loaded via core-loading from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli.rb
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-artifact': an existing plugin with that name was loaded via core-loading from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-artifact/lib/inspec-artifact.rb
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-habitat': an existing plugin with that name was loaded via core-loading from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-habitat/lib/inspec-habitat.rb
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-init': an existing plugin with that name was loaded via core-loading from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-init/lib/inspec-init.rb
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'inspec-compliance': an existing plugin with that name was loaded via core-loading from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-compliance/lib/inspec-compliance.rb
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'train-habitat': an existing plugin with that name was loaded via system_gem-loading from train-habitat
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'train-aws': an existing plugin with that name was loaded via system_gem-loading from train-aws
[2020-02-03T11:19:30+00:00] DEBUG: PluginLoader: refusing to re-register plugin 'train-winrm': an existing plugin with that name was loaded via system_gem-loading from train-winrm
Traceback (most recent call last):
        22: from /usr/local/bin/inspec:349:in `<main>'
        21: from /usr/local/bin/inspec:349:in `load'
        20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.18.51/bin/inspec:11:in `<top (required)>'
        19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
        18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
        17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
        14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
        13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
        12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
         9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:121:in `install'
         8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:362:in `install_from_remote_gem'
         7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:410:in `install_attempt_install'
         6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:70:in `install'
         5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:288:in `install_from_remote_gems'
         4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:324:in `install_gem_to_plugins_dir'
         3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:324:in `each'
         2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:326:in `block in install_gem_to_plugins_dir'
         1: from /opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:1414:in `activate'
/opt/chefdk/embedded/lib/ruby/2.6.0/rubygems/specification.rb:2292:in `check_version_conflict': can't activate minitest-5.11.3, already activated minitest-5.10.3 (Gem::LoadError)
        19: from /usr/local/bin/inspec:349:in `<main>'
        18: from /usr/local/bin/inspec:349:in `load'
        17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.18.51/bin/inspec:11:in `<top (required)>'
        16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
        15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
        14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
        11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
        10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
         9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
         8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
         7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
         6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:121:in `install'
         5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:362:in `install_from_remote_gem'
         4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb:410:in `install_attempt_install'
         3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:70:in `install'
         2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:288:in `install_from_remote_gems'
         1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:323:in `install_gem_to_plugins_dir'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.18.51/lib/inspec/plugin/v2/installer.rb:332:in `rescue in install_gem_to_plugins_dir': can't activate minitest-5.11.3, already activated minitest-5.10.3 (Inspec::Plugin::V2::InstallError)