Open dbacademy opened 1 year ago
could you post kubectl describe gitrepository -n flux-system git-repo-openshift-gitops
here?
it looks repeated error .. may be something wrong I am doing while creating secret with BASE64 PAT value ? anyway it was resolved but into a new enviornment again same issue .. I lost what i did to fix earlier :)
dbiswas@jumpbox:~$ oc describe gitrepository -n flux-system git-repo-openshift-gitops
Name: git-repo-openshift-gitops
Namespace: flux-system
Labels: kustomize.toolkit.fluxcd.io/name=flux-system
kustomize.toolkit.fluxcd.io/namespace=flux-system
Annotations:
Warning GitOperationFailed 1s (x9 over 6m25s) source-controller failed to checkout and determine revision: unable to clone 'https://github.com/dbacademy/openshift-gitops.git': authentication required dbiswas@jumpbox:~$
Delete the git-access-auth
secret from the cluster and recreate it with the Flux CLI like so:
flux -n flux-system create secret git git-access-auth \
--url=https://github.com/dbacademy/openshift-gitops \
--username=dbacademy \
--password=YOUR-GH-PAT
@stefanprodan what should the username be for a private repo in an organization? my username (to which the PAT is created)? or the org name?
Describe the bug
After generating new PAT for my Git repo ... reconcile is failing and unable to create gitrepo in my fluxcd instance.
Surprise the PAT i am using able to write while using with git push but it is failing while using in craeteing basing auth secret and use that to authenticate git repo defination.
{"level":"error","ts":"2023-10-02T14:10:45.352Z","msg":"Reconciler error","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","GitRepository":{"name":"git-repo-openshift-gitops","namespace":"flux-system"},"namespace":"flux-system","name":"git-repo-openshift-gitops","reconcileID":"69d86133-8e7c-4e5a-8f1b-d218a4129c52","error":"failed to checkout and determine revision: unable to clone 'https://github.com/dbacademy/openshift-gitops': authentication required"}
flux get all
NAME REVISION SUSPENDED READY MESSAGE
gitrepository/flux-system master@sha1:d67b28b4 False True stored artifact for revision 'master@sha1:d67b28b4' gitrepository/git-repo-openshift-gitops False False failed to checkout and determine revision: unable to clone 'https://github.com/dbacademy/openshift-gitops': authentication required
NAME
Steps to reproduce
Expected behavior
New git repo should create and reconcile
Screenshots and recordings
No response
OS / Distro
Ubuntu 20.04
Flux version
flux version 2.0.1
Flux check
► checking prerequisites ✗ flux 2.0.1 <2.1.1 (new version is available, please upgrade) ✔ Kubernetes 1.25.10+8c21020 >=1.24.0-0 ✔ prerequisites checks passed
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct