Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

krew fails to work if defaultRemoteName is assigned in ~/.gitconfig #853

Open
dustmop opened this issue Mar 27, 2024 · 1 comment
Open
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@dustmop
Copy link

dustmop commented Mar 27, 2024

I have this config option set in my global ~/.gitconfig file:

[clone]
	defaultRemoteName = home

Which changes the default remote name to home. However, krew assumes that the default remote name is always going to be origin, due to

return Exec(dir, "config", "--get", "remote.origin.url")

This causes most commands to fail:

> kubectl krew install [PACKAGE_NAME_HERE]
failed to retrieve plugin indexes: failed to list the remote URL for index default: command execution failure, output="": exit status 1

It would be better if one of the following were true:

  1. krew would detect this setting and use the actual remote name
  2. krew did not use this setting from the global config, perhaps by running with a blank config
  3. The error message was better when GetRemoteURL returned empty data
@kundan2707
Copy link

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

3 participants