ArgoCD When connecting to Private Repo (internal GitHub Private Repo via HTTPS), we are getting "repository not found"

1.4k Views Asked by At

When Connecting from ArgoCD to HTTPS GitHub Private Repo, we are getting the below error:

time="2023-09-21T13:43:56-04:00" level=fatal msg="rpc error: code = Unknown desc = error testing repository connectivity: repository not found"

When I change the repo visibility from Private to Public, the connection is working fine. But the compliance standards are we need all of our repo's to be Private.

I had the root cert added for the authentication purposes, but ArgoCD should be able to connect to Private Repo's right?

Any info here will help my cause.

1

There are 1 best solutions below

0
On

What is the command you are using to add the repo? A command like this should work:

argocd repo add [email protected]:OrgName/repo-name.git --name repo-name --insecure-ignore-host-key --ssh-private-key-path ~/.ssh/id_rsa

For this, you should have set up GitHub ssh with the machine you are running this command on, so that the id_rsa file is present and you are able to run Git commands on the private repo with it. If those conditions are met then the above command should add the repo into ArgoCD.