krew fails to work if `defaultRemoteName` is assigned in ~/.gitconfig
Author: dustmopCreated Mar 27, 2024Updated Oct 7, 2024
Labelskind/supportlifecycle/frozen
I have this config option set in my global ~/.gitconfig file:
[clone]
defaultRemoteName = homeWhich changes the default remote name to home. However, krew assumes that the default remote name is always going to be origin, due to https://github.com/kubernetes-sigs/krew/blob/efaaa22897a069937e3017dbeb01dfeb6a6aec80/internal/gitutil/git.go#L75
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 1It would be better if one of the following were true:
krewwould detect this setting and use the actual remote namekrewdid not use this setting from the global config, perhaps by running with a blank config- The error message was better when
GetRemoteURLreturned empty data
Source: kubernetes-sigs/krew