stefanprodan / flux-aio

Flux All-In-One distribution made with Timoni
https://timoni.sh/flux-aio
Apache License 2.0
104 stars 40 forks source link

How to use basic auth for private git repo in flux-git-sync #90

Closed codering closed 4 months ago

codering commented 4 months ago

I have a private git repo and no token read it, only have username and password.

codering commented 4 months ago
export DEPLOY_TOKEN=username:password
bundle: {
    _token:   string @timoni(runtime:string:DEPLOY_TOKEN)

    apiVersion: "v1alpha1"
    name:       "podinfo"
    instances: {
        "podinfo": {
            module: url: "oci://ghcr.io/stefanprodan/modules/flux-git-sync"
            namespace: "flux-system"
            values: {
                git: {
                    url:   "https://" + _token + "@your-git-repo"
                    ref:   "refs/heads/master"
                    path:  "./demo"
                }
                sync: targetNamespace: "default"
            }
        }
    }
}