How do I use a Kubernetes git-sync-secret to configure Git so I can push to a repository?

96 Views Asked by At

I'm currently using git-sync as an init container for a Kubernetes pod. I've set it up so that I'm adding credentials from a Kubernetes git-sync-secret.

Within my container, I want to perform operations that push to the same repository that git-sync pulled from.

I'm confused as to how I can do this because when I initially tried Git complained that my identity wasn't set and I had to run git config user@email.

Is there a way that I can use the git-sync-secret automatically without having to go through the configuration? Or would I have to have a step before the push that configures it?

0

There are 0 best solutions below