Issue in Argocd repo server with Public repository

Dear team,
After completing GitOps ArgoCD course from Kodekloud, i was trying out myself installing Argocd with same version which was used in the lecture(v2.11.7). After successful installation, when am trying to add repository its getting failed, however the repository is public but am not able to add it. Even same error am getting while creating the applications with any public git repos. Attached below errors and screenshots for reference. Please address me on this issue to resolve.

Error Message:
Unable to create application: application spec for DemoApp is invalid: InvalidSpecError: repository not accessible: repositories not accessible: &Repository{Repo: “GitHub - LondheShubham153/k8s-kind-voting-app: This is a distributed app composed of multiple containers for Docker, Compose, Swarm, and Kubernetes”, Type: “”, Name: “”, Project: “”}: repo client error while testing repository: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing: dial tcp: lookup argocd-repo-server: i/o timeout”

Hi @Santhosh02

What’s the status of your pods in argocd ns?

Initially, it looks like a DNS issue with your K8s cluster as argocd-server unable to reach repo-server.

You can try to check and troubleshoot the DNS issues following this Doc.

Hi @Santosh_KodeKloud ,

I resolved the issue by adding public dns entries in /etc/resolv.conf file(nameserver 8.8.8.8, nameserver 8.8.4.4)
Post that i just restarted core-dns pods and issue got resolved. Now, argocd is getting connect with github public repo’s successfully. Thank you for your support and assistants.