<p>I'm exploring various options to publish charts and referred <a href="https://stackoverflow.com/questions/59704891/how-to-add-helm-repo-from-an-existing-github-project">How to add helm repo from an existing github project?</a> to achieve it. But when I tried to install the chart, I got the error <code>Error: file '/Users/my_home/Library/Caches/helm/repository/chart-1.0.0.tgz' does not appear to be a gzipped archive; got 'text/html; charset=utf-8'</code></p>
<p>Tried <a href="https://github.com/helm/chart-releaser" rel="nofollow noreferrer">chart-releaser</a> to publish the chart to git. In this case also getting the same error.</p>
<p>When I tried to do <code>wget https://github.com/repo/charts/releases/download/app-1.0.0/chart-1.0.0.tgz</code> content-type is <code>text/html</code>. What's going wrong in this case? How do I fix this issue?</p>

Santosh Hegde
<p>In my case, GitHub is private repo and authentication is required to pull the charts.</p>
<p>What I was doing?</p>
<pre><code>helm repo index CHART_NAME --url &lt;Full URL to chart.tgz file&gt;
</code></pre>
<p>But</p>
<pre><code>helm repo add --username u_name --password token &lt;name&gt; https://github.com/raw/ORG/charts/master
</code></pre>
<p>will add the helm repo, but <code>helm install &lt;name&gt;</code> won't use the same git token passed in previous step.</p>
<p>How to fix it?</p>
<pre><code>helm package &lt;CHART_NAME&gt; -u -d .deploy
helm repo index .
</code></pre>
<p>In this case, index.yaml will contain the relative URL to chart not absolute url.</p>
<p>Same auth tokens are used to fetch <code>.tgz</code> file as well while running <code>helm install</code></p>
