Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to push the updated file to Git #225

Closed
Tracked by #2593
Nithin2994 opened this issue Sep 29, 2021 · 3 comments
Closed
Tracked by #2593

Failed to push the updated file to Git #225

Nithin2994 opened this issue Sep 29, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Nithin2994
Copy link

Getting error "remote authentication required but no callback set" while committing the updated file in git

flux version 0.17.2

Running the kubernetes cluster in "minikube".

Below are my flux resources


NAME                            READY   MESSAGE                                                                 REVISION                                        SUSPENDED 
gitrepository/flux-system       True    Fetched revision: main/37014eb313535c00208c22c67b4c584f02acb68f         main/37014eb313535c00208c22c67b4c584f02acb68f   False    
gitrepository/gameserver-golang True    Fetched revision: master/648267cb4012de456df96d5393a84c017958011b       master/648267cb4012de456df96d5393a84c017958011b False    

NAME                                            READY   MESSAGE                         LAST SCAN                       SUSPENDED 
imagerepository/gameserver-golang-image-repo    True    successful scan, found 3 tags   2021-09-30T03:47:15+05:30       False    

NAME                                            READY   MESSAGE                                                                 LATEST IMAGE                       
imagepolicy/gameserver-golang-image-policy      True    Latest image tag for 'nithin524/gameserver-golang' resolved to: v1.0.5  nithin524/gameserver-golang:v1.0.5

NAME                                                    READY   MESSAGE                                                 LAST RUN                        SUSPENDED 
imageupdateautomation/gameserver-golang-image-update    False   remote authentication required but no callback set      2021-09-30T01:23:37+05:30       False    

NAME                            READY   MESSAGE                                                                 REVISION                                        SUSPENDED 
kustomization/flux-system       True    Applied revision: main/37014eb313535c00208c22c67b4c584f02acb68f         main/37014eb313535c00208c22c67b4c584f02acb68f   False    
kustomization/gameserver-golang True    Applied revision: master/648267cb4012de456df96d5393a84c017958011b       master/648267cb4012de456df96d5393a84c017958011b False    

Below are the logs in Image-automation-controller

{"level":"debug","ts":"2021-09-29T21:25:01.789Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"fetching git repository","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","gitrepository":{"namespace":"flux-system","name":"flux-system"}}
{"level":"debug","ts":"2021-09-29T21:25:01.789Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"using git repository ref from .spec.git.checkout","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","ref":{"branch":"main"}}
{"level":"debug","ts":"2021-09-29T21:25:01.789Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"using push branch from .spec.push.branch","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","branch":"main-push"}
{"level":"debug","ts":"2021-09-29T21:25:01.789Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"attempting to clone git repository","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","gitrepository":{"namespace":"flux-system","name":"flux-system"},"ref":{"branch":"main"},"working":"/tmp/flux-system-flux-system221883560"}
{"level":"debug","ts":"2021-09-29T21:25:04.186Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"updating with setters according to image policies","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","count":1,"manifests-path":"/tmp/flux-system-flux-system221883560"}
{"level":"debug","ts":"2021-09-29T21:25:04.186Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"found policy","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","namespace":"flux-system","name":"gameserver-golang-image-policy","latest-image":"nithin524/gameserver-golang:v1.0.5"}
{"level":"debug","ts":"2021-09-29T21:25:04.186Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"adding setter","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","name":"flux-system:gameserver-golang-image-policy"}
{"level":"debug","ts":"2021-09-29T21:25:04.186Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"adding setter","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","name":"flux-system:gameserver-golang-image-policy:tag"}
{"level":"debug","ts":"2021-09-29T21:25:04.186Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"adding setter","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","name":"flux-system:gameserver-golang-image-policy:name"}
{"level":"debug","ts":"2021-09-29T21:25:04.186Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"scanning files","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","path":"/tmp/flux-system-flux-system221883560","token":"\"$imagepolicy\""}
{"level":"debug","ts":"2021-09-29T21:25:04.187Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"reading file","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","path":"clusters/new-cluster/kustomize/deployment.yaml"}
{"level":"debug","ts":"2021-09-29T21:25:04.187Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"found schema extension","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","path":".spec.template.spec.containers.image"}
{"level":"debug","ts":"2021-09-29T21:25:04.187Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"applying setter","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","setter":"flux-system:gameserver-golang-image-policy","old":"nithin524/gameserver-golang:v1.0.3","new":"nithin524/gameserver-golang:v1.0.5"}
{"level":"debug","ts":"2021-09-29T21:25:04.187Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"ran updates to working dir","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","working":"/tmp/flux-system-flux-system221883560"}
{"level":"debug","ts":"2021-09-29T21:25:04.191Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"adding file","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","file":"clusters/new-cluster/kustomize/deployment.yaml"}
{"level":"debug","ts":"2021-09-29T21:25:04.551Z","logger":"controller-runtime.manager.events","msg":"Normal","object":{"kind":"ImageUpdateAutomation","namespace":"flux-system","name":"gameserver-golang-image-update","uid":"7261c71d-0b82-43dc-9294-e8306b58eba4","apiVersion":"image.toolkit.fluxcd.io/v1beta1","resourceVersion":"2619838"},"reason":"error","message":"remote authentication required but no callback set"}
{"level":"error","ts":"2021-09-29T21:25:04.561Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"Reconciler error","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"gameserver-golang-image-update","namespace":"flux-system","error":"remote authentication required but no callback set","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:214"}

I don't understand why i am getting error related to authentication when i am able to clone the repo successfully in the beginning.

@squaremo squaremo added the bug Something isn't working label Jan 10, 2022
@hiddeco
Copy link
Member

hiddeco commented Jan 10, 2022

Think this may have been solved already by #239, more specifically due to it making now making use of https://github.com/fluxcd/source-controller/blob/5ccb914620ffc3d655ba90387490b4cdf2e49ea7/pkg/git/libgit2/transport.go#L45. Which gets called (internally) with the data from AuthOptionsFromSecret used here:

access.auth, err = git.AuthOptionsFromSecret(access.url, secret)

@squaremo
Copy link
Member

Sorry to not spot this bug report for a while 😞 As Hidde mentioned, there have been improvements to the git-handling code since the version you're running -- I'm thinking of https://github.com/fluxcd/image-automation-controller/blob/main/CHANGELOG.md#0160 and https://github.com/fluxcd/image-automation-controller/blob/main/CHANGELOG.md#0161 in particular. Downloading the most recent flux (https://github.com/fluxcd/flux2/releases) and rerunning flux bootstrap ... (with the same options as you used the first time) may just correct the problem.

@pjbgf
Copy link
Member

pjbgf commented May 27, 2022

The controller has changed substantially since the version in which this problem materialised. As mentioned above, this should no longer happen on the latest versions.

Closing this for lack of activity, but happy to reopen in case of recurrence in the latest release.

@pjbgf pjbgf closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants