<p>I have a helm chart and I want to add it to my gitlab repository. But when I run:</p>
<pre><code>helm repo add repo_name url 
</code></pre>
<p>I am getting the following error:</p>
<pre><code>Error: looks like &quot;https://gitlab.&lt;domain&gt;.com/group/infra/repo/helm/charts/&quot; is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: line 3: mapping values are not allowed in this context
</code></pre>
<p>Linter shows it is a valid chart.</p>
<p>Here is <code>index.yaml</code>:</p>
<pre><code>apiVersion: v1
entries:
  helloworld:
  - apiVersion: v2
    appVersion: 1.0.0
    created: &quot;2021-06-28T14:05:53.974207+01:00&quot;
    description: This Helm chart will be used to create hello world 
    digest: f290432f0280fe3f66b126c28a0bb21263d64fd8f73a16808ac2070b874619e7
    name: helloworld
    type: application
    urls:
    - https://gitlab.&lt;domain&gt;.com/group/infra/repo/helm/charts/helloworld-0.1.0.tgz
    version: 0.1.0
generated: &quot;2021-06-28T14:05:53.973549+01:00&quot;
</code></pre>
<p>Not sure what is missing here.</p>

Ram
<p>It looks like you want to use the helm chart that is hosted on the gitlab. Unfortunately, it won't work as you want it to. As <a href="https://stackoverflow.com/users/1518100/lei-yang">Lei Yang</a> mentioned well in the comment:</p>
<blockquote>
<p><code>helm</code> repo and <code>git</code> repo are different things.</p>
</blockquote>
<p>In the official documentation of Helm, you can find <a href="https://helm.sh/docs/topics/chart_repository/#create-a-chart-repository" rel="nofollow noreferrer">The Chart Repository Guide</a>.
You can find it also a guide <a href="https://helm.sh/docs/topics/chart_repository/#create-a-chart-repository" rel="nofollow noreferrer">how to create a chart repository</a>:</p>
<blockquote>
<p>A <em>chart repository</em> is an HTTP server that houses an <code>index.yaml</code> file and optionally some packaged charts. When you're ready to share your charts, the preferred way to do so is by uploading them to a chart repository.</p>
</blockquote>
<p>Here you can find section, how to properly <a href="https://helm.sh/docs/topics/chart_repository/#hosting-chart-repositories" rel="nofollow noreferrer">host chart repos</a>. There are several ways to do this - for example you can use a Google Cloud Storage (GCS) bucket, Amazon S3 bucket, GitHub Pages, or even create your own web server.</p>
<p>You can also use the <a href="https://chartmuseum.com/docs/#using-with-local-filesystem-storage" rel="nofollow noreferrer">ChartMuseum</a> server to host a chart repository from a local file system.</p>
<blockquote>
<p>ChartMuseum is an open-source Helm Chart Repository server written in Go (Golang), with support for cloud storage backends, including <a href="https://cloud.google.com/storage/" rel="nofollow noreferrer">Google Cloud Storage</a>, <a href="https://aws.amazon.com/s3/" rel="nofollow noreferrer">Amazon S3</a>, <a href="https://azure.microsoft.com/en-us/services/storage/blobs/" rel="nofollow noreferrer">Microsoft Azure Blob Storage</a>, <a href="https://www.alibabacloud.com/product/oss" rel="nofollow noreferrer">Alibaba Cloud OSS Storage</a>, <a href="https://developer.openstack.org/api-ref/object-store/" rel="nofollow noreferrer">Openstack Object Storage</a>, <a href="https://cloud.oracle.com/storage" rel="nofollow noreferrer">Oracle Cloud Infrastructure Object Storage</a>, <a href="https://cloud.baidu.com/product/bos.html" rel="nofollow noreferrer">Baidu Cloud BOS Storage</a>, <a href="https://intl.cloud.tencent.com/product/cos" rel="nofollow noreferrer">Tencent Cloud Object Storage</a>, <a href="https://www.digitalocean.com/products/spaces/" rel="nofollow noreferrer">DigitalOcean Spaces</a>, <a href="https://min.io/" rel="nofollow noreferrer">Minio</a>, and <a href="https://etcd.io/" rel="nofollow noreferrer">etcd</a>.</p>
</blockquote>
<p>Alternatively it could be also possible to <a href="https://jfrog.com/blog/host-your-helm-chart-in-chartcenter-directly-from-source/" rel="nofollow noreferrer">host helm charts in JFrog</a>.</p>
