- 
                Notifications
    You must be signed in to change notification settings 
- Fork 687
Description
Describe the bug
When using flux cli, I expect to be able to use Azure DevOps personal access token (PAT). But the command "flux create source git" delete the Kubernetes secret when the username is not specified. If we modify the secret manually, removing the username, everything still working.
Steps to reproduce
- install flux in a Kubernetes cluster
- run command line "flux create source git password='${my-PAT}' --url='${my-git-repo}' name"
- flux gitreposity created but authentication fails
- secret with the same as the gitrepository
Expected behavior
A kubernetes secret shoul be created without username but with password field.
Screenshots and recordings
No response
OS / Distro
Ubuntu 20.04
Flux version
v0.34.0
Flux check
► checking prerequisites
✗ flux 0.34.0 <2.0.0-rc.3 (new version is available, please upgrade)
✔ Kubernetes 1.23.7 >=1.20.6-0
✔ helm-controller: deployment ready
✔ image-automation-controller: deployment ready
✔ image-reflector-controller: deployment ready
✔ kustomize-controller: deployment ready
✔ notification-controller: deployment ready
✔ source-controller: deployment ready
✔ alerts.notification.toolkit.fluxcd.io/v1beta1
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1beta2
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta1
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta1
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta1
✔ receivers.notification.toolkit.fluxcd.io/v1beta1
✔ all checks passed
Git provider
Azure DevOps
Container Registry provider
No response
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct