To authenticate to another git repository that uses a different keys, we can run the following command to generate secret. 

flux create secret git jeremywoo119-auth --url=ssh://git@github.com/jeremywoo119/my-demo-app --namespace=flux-system

Next, we need to update the generated ssh key to our github by going to Settings -> SSH Key -> New SSH Key.

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: demo-app
  namespace: flux-system
spec:
  interval: 1m
  url: ssh://git@github.com/jeremywoo119/my-demo-app
  secretRef:
    name: jeremywoo119-auth # Matches the secret name above
  ref:
    branch: main

 And if everything goes well, we can see:-  



To force reconciliation for whatever reason, please run the following command 

flux reconcile source git demo-app -n flux-system




Comments

Popular posts from this blog

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error