source-controller icon indicating copy to clipboard operation
source-controller copied to clipboard

repository not found error invalid

Open bob-rohan opened this issue 3 years ago • 3 comments

When using recurseSubmodules, and having stupidly missed adding the required permissions to all submodules, I receive the following error

{"level":"error","ts":"2021-05-19T20:52:37.657Z","logger":"controller.gitrepository","msg":"Reconciler error","reconciler group":"source.toolkit.fluxcd.io","reconciler kind":"GitRepository","name":"cluster-sync","namespace":"flux-system",
"error":"unable to clone 'ssh://[email protected]', error: repository not found"}

The permission on the "parent" repo quoted in the error are fine. It's just the submodule which was causing the issue due to missing permissions. So repository not found is not valid.

This may be issue with go-git error, not sure where it sources.

bob-rohan avatar May 20 '21 10:05 bob-rohan

This sounds like the same report as https://github.com/fluxcd/flux2/issues/1426 but now with submodules.

It's not clear from the redacted part if the error "not found" is reported about the parent repo (inaccurately) or if it mentions the repo that auth failed on.

Generally held that auth failures can result in 404 to avoid revealing the existence of a secret thing. I think it's a bug if it doesn't mention the submodule that failed, but if the upstream service returns Not Found errors, then there may be no way to translate that into a more specific auth failure.

yebyen avatar May 20 '21 11:05 yebyen

It's not clear from the redacted part if the error "not found" is reported about the parent repo (inaccurately

The error redacted reports about the parent repo

I think it's a bug if it doesn't mention the submodule that failed

It does not mention the submodule that failed.

bob-rohan avatar May 20 '21 12:05 bob-rohan

I think this is a UX bug, we should report accurately about which repo failed cloning.

kingdonb avatar Aug 19 '21 17:08 kingdonb