krew icon indicating copy to clipboard operation
krew copied to clipboard

Installing krew - failed to list indexes on Windows

Open uriyay opened this issue 1 year ago • 3 comments

Had the same issue as this When I tried to run: kubectl krew install sniff

Digging into it, I saw that it tries to run: git config --get remote.origin.url from the folder %USERPROFILE%.krew\index\default. But since it was cloned by admin and not a regular user it returned nothing, and when I ran git remote -v I got:

'.krew/index/default' is owned by:
        'S-...'
but the current user is:
        'S-......'
To add an exception for this directory, call:

        git config --global --add safe.directory '.krew/index/default'

Solved it by deleting %USERPROFILE%.krew\index\default and cloning it from a non admin user by: git clone https://github.com/kubernetes-sigs/krew-index.git %USERPROFILE%\.krew\index\default

That solved this specific error, but later I got another error:

W0215 19:50:01.507919   64756 install.go:164] failed to install plugin "sniff": install failed: failed to link installed plugin: failed to create a symlink from".krew\\store\\sniff\\v1.6.2\\kubectl-sniff.exe" to ".krew\\bin\\kubectl-sniff.exe": symlink .krew\store\sniff\v1.6.2\kubectl-sniff.exe .krew\bin\kubectl-sniff.exe: A required privilege is not held by the client.

So I ran it with admin and it worked.

So I think that in the Windows section in the install guide there should be a guidance that kubectl krew install <plugin> should be done also by an admin user.

uriyay avatar Feb 15 '24 18:02 uriyay

/kind support

kundan2707 avatar Feb 16 '24 08:02 kundan2707

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 16 '24 08:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 15 '24 08:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Jul 15 '24 09:07 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Jul 15 '24 09:07 k8s-ci-robot