argocd-autopilot
argocd-autopilot copied to clipboard
Unable to create apps from a different git provider than the destination.
Auume GIT_REPO is Azure DevOps (and GIT_TOKEN is for Azure DevOps oviously) and if the user tries to create app from GitHub, the credential for Azure DevOps is used to clone the repo frmo GitHub, resuling an error: "authentication required".
Reproduce
export GIT_REPO=https://[email protected]/org/proj/_git/repo
export GIT_TOKEN=accesstokenforazuredevops
argocd-autopilot --log-level debug \
app create demoapp \
--app github.com/argoproj-labs/argocd-autopilot/examples/demo-app/ \
-p testing
> ...
> INFO[2024-09-19T05:19:40Z] cloning repo: 'https://github.com/argoproj-labs/argocd-autopilot.git', to infer app type from path 'examples/demo-app/'
> DEBU[2024-09-19T05:19:40Z] cloning git repo url="https://github.com/argoproj-labs/argocd-autopilot.git"
> FATA[2024-09-19T05:19:40Z] authentication required
How about to retrieve the credentials from git credential store rather than env?