Razi Ahmad
05/23/2024, 1:17 PMlogger":"cerbos.git.store","message":"Failed to initialize git store","dir":"//tmp/work/policies","error":"failed to clone from <http://github.xyz/xyz/apo.git|github.xyz/xyz/apo.git> to //tmp/work/policies: exec: \"git\": executable file not found in $PATH"}
{"log.level":"error","@timestamp":"2024-05-23T11:24:52.171Z","log.logger":"cerbos.server","message":"Failed to start server","error":"failed to create store: failed to clone from <http://github.xyz/xyz/apo.git|github.xyz/xyz/apo.git> to //tmp/work/policies: exec: \"git\": executable file not found in $PATH"}
{"log.level":"info","@timestamp":"2024-05-23T11:24:52.171Z","log.logger":"cerbos.server","message":"maxprocs: Resetting GOMAXPROCS to 8"}
cerbos: error: failed to create store: failed to clone from <http://github.xyz/xyz/apo.git|github.xyz/xyz/apo.git> to //tmp/work/policies: exec: "git": executable file not found in $PATH
and this is my config map
apiVersion: v1
kind: ConfigMap
metadata:
name: cerbos-sidecar-demo
data:
".cerbos.yaml": |-
server:
# Configure Cerbos to listen on a Unix domain socket.
httpListenAddr: "unix:/sock/cerbos.sock"
storage:
driver: "git"
git:
protocol: https
url: <http://github.xyz/xyz/apo.git|github.xyz/xyz/apo.git>
branch: main
subDir: policies
checkoutDir: ${HOME}/tmp/work/policies
updatePollInterval: 60s
operationTimeout: 30s
https:
username: xyz
password: *******
oguzhan
exec: "git": executable file not found in $PATH
I think the image you’re using doesn’t have git
available.Razi Ahmad
05/23/2024, 1:22 PM##################
# Cerbos sidecar #
##################
- name: cerbos
image: "<http://ghcr.io/cerbos/cerbos:0.36.0|ghcr.io/cerbos/cerbos:0.36.0>"
imagePullPolicy: IfNotPresent
args:
- "server"
- "--config=/config/.cerbos.yaml"
- "--log-level=INFO"
volumeMounts:
# Mount the shared volume containing the socket
- name: sock
mountPath: /sock
- name: cerbos-config
mountPath: /config
readOnly: true
oguzhan
Razi Ahmad
05/23/2024, 1:27 PMAndrew Haines (Cerbos)
storage.git.url
might be the problem. Does it work if you change it to
<https://github.xyz/xyz/apo.git>
?Razi Ahmad
05/23/2024, 1:41 PMRazi Ahmad
05/23/2024, 1:51 PMRazi Ahmad
05/23/2024, 1:51 PMAndrew Haines (Cerbos)
Razi Ahmad
05/23/2024, 1:53 PMprotocol: https
Razi Ahmad
05/23/2024, 1:53 PMAndrew Haines (Cerbos)
Razi Ahmad
05/23/2024, 1:53 PMAndrew Haines (Cerbos)