<p>I have an ArgoCD installation and want to add a GitHub repository using SSH access with an SSH key pair to it using the declarative DSL.</p>
<p>What I have is:</p>
<pre><code>apiVersion: v1
data:
  sshPrivateKey: &lt;my private ssh key base64 encoded&gt;
  url: &lt;url base64 encoded&gt;
kind: Secret
metadata:
  annotations:
    meta.helm.sh/release-name: argocd-config
    meta.helm.sh/release-namespace: argocd
  creationTimestamp: &quot;2021-06-30T12:39:35Z&quot;
  labels:
    app.kubernetes.io/managed-by: Helm
    argocd.argoproj.io/secret-type: repo-creds
  name: repo-creds
  namespace: argocd
  resourceVersion: &quot;364936&quot;
  selfLink: /api/v1/namespaces/argocd/secrets/repo-creds
  uid: 8ca64883-302b-4a41-aaf6-5277c34dfbfc
type: Opaque
---
apiVersion: v1
data:
  url: &lt;url base64 encoded&gt;
kind: Secret
metadata:
  annotations:
    meta.helm.sh/release-name: argocd-config
    meta.helm.sh/release-namespace: argocd
  creationTimestamp: &quot;2021-06-30T12:39:35Z&quot;
  labels:
    app.kubernetes.io/managed-by: Helm
    argocd.argoproj.io/secret-type: repository
  name: argocd-repo
  namespace: argocd
  resourceVersion: &quot;364935&quot;
  selfLink: /api/v1/namespaces/argocd/secrets/argocd-repo
  uid: 09de56e0-3b0a-4032-8fb5-81b3a6e1899e
type: Opaque

</code></pre>
<p>I can manually connect to  that GitHub private repo using that SSH key pair, but using the DSL, the repo doesn't appear in the ArgoCD GUI.</p>
<p>In the log of the argocd-repo-server I am getting the error:</p>
<pre><code>time=&quot;2021-06-30T14:48:25Z&quot; level=error msg=&quot;finished unary call with code Unknown&quot; error=&quot;authentication required&quot; grpc.code=Unknown grpc.method=GenerateManifest grpc.request.deadline=&quot;2021-06-30T14:49:25Z&quot; grpc.service=repository.RepoServerService grpc.start_time=&quot;2021-06-30T14:48:25Z&quot; grpc.time_ms=206.505 span.kind=server system=grpc

</code></pre>
<p>I deploy the secrets with helm.</p>
<p>So can anyone help me point in the right direction? What am I doing wrong?</p>
<p>I basically followed the declarative documentation under: <a href="https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/" rel="nofollow noreferrer">https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/</a></p>
<p>Thanks in advance.</p>
<p>Best regards,
rforberger</p>

Ronny Forberger
<p>I am not sure about helm, since I am working with the yaml files for now, before moving into helm. You could take a look at this <a href="https://github.com/argoproj/argo-cd/issues/1172" rel="nofollow noreferrer">Github issue</a> here to configure SSH Key for helm</p>
<p>I had this issue, when I was working with manifests. The repo config should be in argocd-cm configmap. The fix was this:</p>
<pre class="lang-yaml prettyprint-override"><code>---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  repositories: |
    - name: my-test-repo
      url: ssh://git@repo-url/path/to/repo.git
      type: git
      insecure: true.                  // To skip verification
      insecureIgnoreHostKey: true      // to ignore host key for ssh
      sshPrivateKeySecret:
        name: private-repo-creds
        key: sshPrivateKey
---
apiVersion: v1
kind: Secret
metadata:
  name: private-repo-creds
  namespace: argocd
  labels:
    argocd.argoproj.io/secret-type: repo-creds
data:
  sshPrivateKey: &lt;my private ssh key base64 encoded&gt;
</code></pre>
<p>And I am not sure if the documentation is correct or not, because I can see the document in stable is a bit different, although both your link and this <a href="https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories" rel="nofollow noreferrer">stable doc link</a> are from the same version</p>
