kubernetes / git-sync

A sidecar app which clones a git repo and keeps it in sync with the upstream.
Apache License 2.0
2.16k stars 409 forks source link

Handle errors from credential refresh (v3) #782

Closed thockin closed 11 months ago

thockin commented 11 months ago

Previously, errors from askpass and credential storage were being ignored, causing git clone/fetch to later error with hard-to-read errors.

Now the error indicates the credential refresh as the problem, and either does not try to sync (if no creds) or tries to use previous creds (if they were fetched at some point).

Replaces #775

k8s-ci-robot commented 11 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: karlkfi, thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes/git-sync/blob/release-3.x/OWNERS)~~ [thockin] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment