Ask questionsError: validation: chart.metadata is required when using --repo

I am trying to upgrade/install a chart in my cluster. I want to load the chart "on the fly" from a remote without configuring the repo beforehand (running this process on CI).

helm upgrade foo foo --install --repo --username foo --password bar --version 0.5.0

For some reason I get

Error: validation: chart.metadata is required

Downloading the chart first and installing it from local .tgz is working as expected. Also it's working installing it from a local configured repository. It seems to affect only the --repo approach.index.yaml from the repo seems fine also to me.

Output of helm version:

version.BuildInfo{Version:"v3.0.0-rc.1", GitCommit:"ee77ae3d40fd599445ebd99b8fc04e2c86ca366c", GitTreeState:"clean", GoVersion:"go1.13.3"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.1", GitCommit:"d647ddbd755faf07169599a625faf302ffc34458", GitTreeState:"clean", BuildDate:"2019-10-02T17:01:15Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.10", GitCommit:"37d169313237cb4ceb2cc4bef300f2ae3053c1a2", GitTreeState:"clean", BuildDate:"2019-08-19T10:44:49Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}

Answer questions topikachu

Hi, I meet this problem of the stable/metrics-server

When I use a local repo cache it works. helm repo add stable helm install metrics-server stable/metrics-server

However, when I try to use --repo I meet the problem helm install metrics-server metrics-server --repo Error: validation: chart.metadata is required


Related questions

"Error: Transport is closing" message when attempting to install hot 2
Error: open .helm\repository\cache\local-index.yaml hot 2
"helm dep build" fails if requirements.yaml contains local dependencies and remote one hot 2
Helm upgrade fails the release after adding a new resource hot 2
Error: could not find a ready tiller pod hot 2
Error: apiVersion 'v2' is not valid. The value must be "v1" hot 2
Unable to start Tiller pod, bind address already in use hot 2
Upgrading releases with immutable resources (e.g. persitentVolume) hot 2
helm 3: Not able to push chart to docker hub hot 1
`helm upgrade --recreate-pods` flag should do a soft restart - helm hot 1
Helm3: No 'init', doesn't use existing ~/.helm hot 1
No kind Job is registered for version batch/v1 hot 1
`Error: rendered manifests contain a resource that already exists` but nothing shows up on `helm list --all` - helm hot 1
error calling eq: invalid type for comparison hot 1
upgrade apiVersion in k8s from 1.14 to 1.16 FAILED hot 1
Github User Rank List