kubernetes-sigs / krew

📦 Find and install kubectl plugins
https://krew.sigs.k8s.io
Apache License 2.0
6.32k stars 363 forks source link

failed to retrieve plugin indexes #859

Closed manuelcarriernunesatsap closed 1 month ago

manuelcarriernunesatsap commented 1 month ago

image

Please help.

Best regards, Manuel

ahmetb commented 1 month ago

/kind support

does your git command work in that shell? Try running as Administrator maybe since Krew requires that.

manuelcarriernunesatsap commented 1 month ago

Yes, the git command works in that shell. I believe the screenshot below shows this.

image

Running the kubectl krew install oidc-login command as an administrator installed the plugin.

I was under the impression that running as an administrator was only necessary during the installation of Krew (i.e., when I ran the .\krew.exe install krew command) because the installer creates a symbolic link, which requires administator access in Windows.

The error message could be improved, though. The error message says that Krew couldn't find the remote URL for index default. It's weird that Krew needs administrator access to get the URL. Might I suggest that the Krew development team add a note to the https://krew.sigs.k8s.io/docs/user-guide/installing-plugins/ page that says that Windows users must install plugins as administrators.

Thank you very much for providing a solution.

ahmetb commented 1 month ago

Do you mind rerunning the same command with -v=10 flag and pasting output. The output should be capturing permission issues.

manuelcarriernunesatsap commented 1 month ago

Not at all. Here is the output of running that command: image

ahmetb commented 1 month ago

Can you run that “git config …” command listed manually in %home%.krew\index\default please? It seems to be exiting with no output from this logs.

manuelcarriernunesatsap commented 1 month ago

When I run git config --get remote.origin.url as a non-administrator, I get the following: image

And when I run it as an administrator, I get the following: image

ahmetb commented 1 month ago

I think this is something we can't easily help with. I believe our error message does its best already. I suspect this is a problem with your setup, something preventing execution of the command when not an Administrator and not letting git print anything maybe?

At any case, closing as wontfix now. I have not heard of another occurrence of this out in the wild.

/close

k8s-ci-robot commented 1 month ago

@ahmetb: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/krew/issues/859#issuecomment-2245555005): >I think this is something we can't easily help with. I believe our error message does its best already. I suspect this is a problem with your setup, something preventing execution of the command when not an Administrator and not letting git print anything maybe? > >At any case, closing as wontfix now. I have not heard of another occurrence of this out in the wild. > >/close > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
manuelcarriernunesatsap commented 1 month ago

Wow!

ahmetb commented 1 month ago

@manuelcarriernunesatsap "Wow" what exactly? The installation guide tells you that you to use "Administrator" user to install Krew. Furthermore, Krew uses symlinks, so to be able to install plugins, you'll need to run as Administrator.

On top of all that, my Windows 11 installation runs "kubectl krew update" (in non-Administrator shell) just fine without any failure.

So, based on lack of any other reports I think this is not a widespread issue and it's just you.