turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.69k stars 264 forks source link

Unable to update plugins: "docker-credential-desktop... not found in $PATH" #4323

Closed rozling closed 6 days ago

rozling commented 1 week ago

Describe the bug I want to update my plugins to the latest versions. I currently have:

+---------------------------------------------------+---------+-------------+
| Installed                                         | Version | Connections |
+---------------------------------------------------+---------+-------------+
| hub.steampipe.io/plugins/turbot/azure@latest      | 0.46.0  | azure       |
| hub.steampipe.io/plugins/turbot/azuread@latest    | 0.12.0  | azuread     |
| hub.steampipe.io/plugins/turbot/kubernetes@latest | 0.22.0  | kubernetes  |
| hub.steampipe.io/plugins/turbot/net@latest        | 0.9.0   | net         |
| hub.steampipe.io/plugins/turbot/openai@latest     | 0.1.0   | openai      |
| hub.steampipe.io/plugins/turbot/steampipe@latest  | 0.8.0   | steampipe   |
| hub.steampipe.io/plugins/turbot/terraform@latest  | 0.7.0   | terraform   |
+---------------------------------------------------+---------+-------------+

Tried updating them with steampipe plugin update --all For each plugin I see similar output to this:

Skipped the following plugins:

Plugin:   azure@0.61.0
Reason:   failed to resolve 0.61.0: GET "https://ghcr.io/v2/turbot/steampipe/plugins/turbot/azure/manifests/0.61.0": exec: "docker-credential-desktop": executable file not found in $PATH

Searched open / closed issues but couldn't find anything like this.

I have Docker installed but not running. Confused as to why Steampipe would need the docker-credential-desktop executable to install plugins; would have thought it would be installed as a dependency / documented if so.

Steampipe version (steampipe -v) v0.23.2

To reproduce

Expected behavior All plugins are updated

Additional context

pskrbasu commented 1 week ago

@rozling Steampipe does not require docker-credential-desktop. I tried on my mac and vanilla ubuntu containers(which don't have docker-credential-desktop), but I could not reproduce this error.

A few questions to better understand the issue:

rozling commented 1 week ago

Thanks for reply

  • What happens if you try to update a single plugin (eg: steampipe plugin update azure)?
turbot/azure                   [====================================================================] Done

Skipped the following plugin:

Plugin:   azure@0.61.0
Reason:   failed to resolve 0.61.0: GET "https://ghcr.io/v2/turbot/steampipe/plugins/turbot/azure/manifests/0.61.0": exec: "docker-credential-desktop": executable file not found in $PATH
  • Can you install plugins?

No, same error:

aws                            [====================================================================] Done

Skipped the following plugin:

Plugin:   aws@0.142.0
Reason:   failed to resolve 0.142.0: GET "https://ghcr.io/v2/turbot/steampipe/plugins/turbot/aws/manifests/0.142.0": exec: "docker-credential-desktop": executable file not found in $PATH
  • Is this issue specific to this version?

Good call - in fact when I reverted to 0.22.1, I was able to install the above AWS plugin! I'll try to find out what version it stops working.

  • Are you logged in to ghcr with docker? If yes, then can you try logging out (should not require but worth a shot)?

As far as I can tell, I'm not logged in to ghcr

rozling commented 1 week ago

@pskrbasu confirmed that the latest (non-alpha) version with expected behaviour is v0.22.2

i.e. in that version I can install plugins & update all plugins.

Once I install v0.23.0 I can no longer install / update plugins, and get a similar error to the docker-credential-desktop one mentioned above.

pskrbasu commented 1 week ago

@rozling Hmm, can you try this and let us know if it works? https://stackoverflow.com/a/65896682/16697980

rozling commented 1 week ago

That works!

And re-adding it stops it working again.

So the question is why the docker config can break this - does Steampipe use Docker under the hood?

rozling commented 6 days ago

@kaidaguerre this issue is not fixed: A workaround was suggested.

As I mentioned in my previous comment, we still don't know why Steampipe failed in this instance.

The tool does not output any useful messages indicating what the problem might be, even when passing the verbose flag.

If Steampipe: a) needs access to my Docker configuration file b) needs that file to have certain settings

And most importantly:

kaidaguerre commented 4 days ago

Hi @rozling

We now have a fix for the underlying issue, which ensures that Steampipe will not use local docker config. THis will be released in the upcoming steampipe patch.

rozling commented 4 days ago

Hi @kaidaguerre

Glad to hear that, thanks for the update.

pdecat commented 4 days ago

Sadly, this breaks installing from a private Gitlab OCI registry, with steampipe 0.23.3:

# steampipe plugin install registry.myhost/myproject/steampipe-plugin-myplugin

registry.myhost/myproject… [====================================================================] Done

Skipped the following plugin:

Plugin:   steampipe-plugin-myplugin@latest
Reason:   failed to resolve latest: GET "https://registry.myhost/myproject/steampipe-plugin-myplugin/manifests/latest": GET "https://git.fr.clara.net/jwt/auth?scope=repository%3Amyproject%2Fsteampipe-plugin-myplugin%3Apull&service=container_registry": response status code 403: denied: access forbidden

With steampipe 0.23.2:

# steampipe plugin install registry.myhost/myproject/steampipe-plugin-myplugin

registry.myhost/myproject… [====================================================================] Done

Installed plugin: steampipe-plugin-myplugin@latest v1.5.1
Documentation:    https://registry.myhost/myproject/steampipe-plugin-myplugin
pdecat commented 4 days ago

@graza-io @kaidaguerre Could using the local docker config be made an option?