How to fix repository not found in Kubernetes

KubernetesBEGINNERHIGHUpdated Dec 6, 2025ยท 96 views

Repository not found errors occur when ArgoCD cannot access the Git repository URL. Common causes include incorrect URLs, missing GitHub App authorization, Helm vs Git repository confusion, and missing repository credentials.

Quick fix

Fixes repository not found

git clone <your-url>
  1. Verify the repository URL format
  2. Add .git suffix for GitLab repositories
  3. Check if using Helm chart instead of Git source
  4. Authorize GitHub App at repository level
kubernetes โ€” error
git clone <your-url>
repository not found

What this error means

The "repository not found" error indicates that ArgoCD cannot locate or access the specified Git repository URL. This can happen with either public or private repositories and is usually caused by URL formatting issues, authentication problems, or application configuration mismatches.

Typical symptoms

  • Error message "repository not found" or 404 when connecting to repo
  • Application fails to create with unknown repository URL
  • Helm repository defined as Git repository in ArgoCD
  • Private repository accessible locally but not from ArgoCD
  • GitHub App authorization prompt appeared but was not accepted
  • Repository URL works in git CLI but fails in ArgoCD
  • ArgoCD shows repo status as Unknown or Failed
  • GitLab repository inaccessible without .git suffix

Common causes

  1. Repository URL is incorrectly formatted or typo in URL
  2. Defining Helm repository chart source instead of Git source
  3. Missing GitHub App authorization at repository level
  4. Private repository missing authentication credentials configured
  5. GitLab repository requires .git suffix in URL
  6. Repository URL changed after initial ArgoCD configuration
  7. Path to manifest or Helm chart does not exist in repository
  8. ArgoCD namespace blocked by firewall or network policies

How to fix "repository not found"

1Verify the repository URL format

Ensure the URL is correct and properly formatted:
- Git over HTTPS: https://github.com/owner/repo.git
- Git over SSH: git@github.com:owner/repo.git
- GitLab: https://gitlab.com/owner/repo.git
Test locally:

bash
git clone <your-url>
2Add .git suffix for GitLab repositories

Some Git providers require the .git suffix. For GitLab, explicitly add it:

bash
https://gitlab.com/owner/repo.git

GitLab may send a 301 redirect without the suffix that ArgoCD does not follow.

3Check if using Helm chart instead of Git source

If your application is a Helm chart, use the chart property instead of path in your Application:

yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  source:
    repoURL: https://helm.example.com
    chart: mychart
    targetRevision: 1.0.0

Instead of:

yaml
source:
    repoURL: https://helm.example.com
    path: mychart
4Authorize GitHub App at repository level

For private GitHub repositories, the GitHub App must be authorized:
1. Go to your repository Settings > Installed GitHub Apps
2. Find the ArgoCD GitHub App
3. Click Authorize to grant repository access
4. Retry the repository connection in ArgoCD

5Configure repository credentials for private repos

Add repository credentials in ArgoCD before using a private repository:

bash
argocd repo add https://github.com/private/repo \
  --username your-username \
  --password your-token
6Verify network connectivity from ArgoCD

Check if ArgoCD can reach the repository host. From repo-server pod:

bash
kubectl exec -it -n argocd deployment/argocd-repo-server -- \
  curl -I https://github.com/owner/repo
7Check if path exists in repository

Verify that the path specified in your Application actually exists:

yaml
spec:
  source:
    path: k8s/overlays/prod

The directory must exist in the Git repository at that path.

8Test repository connectivity with ArgoCD CLI

Verify the repository can be accessed:

bash
argocd repo test https://github.com/owner/repo

This will test if ArgoCD can connect to and access the repository.

Advanced notes

For multi-repository setups, use repository credentials templates to avoid configuring the same credentials multiple times. When using private repositories at enterprise scale, consider using an external secrets operator to inject credentials dynamically. Test repository connectivity in your CI/CD pipeline before creating ArgoCD applications to catch issues early.

Frequently asked questions

What does "repository not found" mean?
The "repository not found" error indicates that ArgoCD cannot locate or access the specified Git repository URL. This can happen with either public or private repositories and is usually caused by URL formatting issues, authentication problems, or application configuration mismatches.
How do I fix "repository not found"?
Repository not found errors occur when ArgoCD cannot access the Git repository URL. Common causes include incorrect URLs, missing GitHub App authorization, Helm vs Git repository confusion, and missing repository credentials.
What causes "repository not found"?
Repository URL is incorrectly formatted or typo in URL Defining Helm repository chart source instead of Git source Missing GitHub App authorization at repository level
Is the "repository not found" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading