argocd-autopilot icon indicating copy to clipboard operation
argocd-autopilot copied to clipboard

Unable to create apps from a different git provider than the destination.

Open lesomnus opened this issue 1 year ago • 1 comments

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 

lesomnus avatar Sep 19 '24 05:09 lesomnus

How about to retrieve the credentials from git credential store rather than env?

lesomnus avatar Sep 19 '24 05:09 lesomnus