Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
rozling opened this issue Jul 4, 2024 · 10 comments
Closed
Labels
bug Something isn't working

Comments

@rozling
Copy link

rozling commented Jul 4, 2024

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

  • Remove Steampipe from homebrew
  • Reinstall using brew install steampipe
  • Run steampipe plugin update --all

Expected behavior
All plugins are updated

Additional context

  • MacOS Ventura 13.4.1
@rozling rozling added the bug Something isn't working label Jul 4, 2024
@pskrbasu
Copy link
Contributor

pskrbasu commented Jul 5, 2024

@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:

  • What happens if you try to update a single plugin (eg: steampipe plugin update azure)?
  • Can you install plugins?
  • Is this issue specific to this version?
  • Are you logged in to ghcr with docker? If yes, then can you try logging out (should not require but worth a shot)?
  • Is this happening occasionally or can you reproduce it always?

@rozling
Copy link
Author

rozling commented Jul 5, 2024

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
Copy link
Author

rozling commented Jul 5, 2024

@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
Copy link
Contributor

pskrbasu commented Jul 5, 2024

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

@rozling
Copy link
Author

rozling commented Jul 5, 2024

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
Copy link
Author

rozling commented Jul 9, 2024

@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

  • Why is this?
  • Why is it not documented?

And most importantly:

  • What other files is it trying to access on my system?

@kaidaguerre
Copy link
Contributor

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
Copy link
Author

rozling commented Jul 11, 2024

Hi @kaidaguerre

Glad to hear that, thanks for the update.

@pdecat
Copy link
Contributor

pdecat commented Jul 11, 2024

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
Copy link
Contributor

pdecat commented Jul 11, 2024

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

@pskrbasu pskrbasu mentioned this issue Jul 17, 2024
4 tasks
kaidaguerre added a commit that referenced this issue Jul 18, 2024
* fix: skips docker config for credential store, allows GHCR to work if docker-credential-desktop not on PATH. Closes #4323

* v0.23.3. Closes #4328

* Update CHANGELOG for v0.23.3

* Update goreleaser args

* Use goreleaser v1

* fix: fixed credStore to use Docker when not Turbot GHCR. Closes #4330

* Update CHANGELOG

* Update FDW to v1.11.4 (#4334)

---------

Co-authored-by: Graza <code@graza.io>
Co-authored-by: kai <kai@turbot.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants