zapier / kubechecks

Check your Kubernetes changes before they hit the cluster
https://kubechecks.readthedocs.io/en/latest/
Mozilla Public License 2.0
136 stars 6 forks source link

`failed to set git email address: exit status 255` #220

Open alex-souslik-hs opened 1 month ago

alex-souslik-hs commented 1 month ago

Hello, I'm trying to set up kubechecks and I keep getting this error

2:15PM DBG Debug level logging enabled.
2:15PM TRC Trace level logging enabled.
2:15PM INF Initialized logger.
2:15PM INF setting logrus log level log_level=error
2:15PM INF Starting KubeChecks git-commit=7bdb545 git-tag=v1.6.2
2:15PM INF parsing configuration
2:15PM INF Server Configuration: 
2:15PM INF Webhook URL Base: https://kubechecks.example.com
2:15PM INF Webhook URL Prefix: 
2:15PM INF VCS Type: github
2:15PM DBG Token Length - 40
2:15PM INF ArgoCD client configuration auth-token=240 grpc-web-root-path= insecure=false server-addr=argocd-server.argocd
2:15PM INF initializing git settings
2:15PM DBG building command args=["config","--global","user.email","kubechecks@zapier.com"]
2:15PM FTL failed to initialize git settings error="failed to set git email address: exit status 255"

Are there missing permissions in my token? Is it due to security context restrictions?

alex-souslik-hs commented 1 month ago

After some trial and error with the security context, I'm pretty sure the container has to run with root otherwise git config commands fail. Running with root is a pretty bad practice, I think this need to be fixed.