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

v0.2.27 Error: authentication required in `app create`, if app repo provider != bootstrapped repo provider

Open St4NNi opened this issue 3 years ago • 8 comments

If the bootstrapped argocd repo is privately hosted via another git-provider (e.g. gitlab), autopilot cannot create a new app based on a public github repo because it tries to reuse the invalid (private) gitlab credentials for github.

-> As a short workaround i introduced a new boolean --ignore-app-creds flag to the app create command that overwrites the git.Auth for the AppsCloneOpts.

It would be nice to specify different credentials for the argocd repo and the target app repo.

St4NNi avatar Dec 08 '21 11:12 St4NNi

Nevermind i found the --apps-git-token and --apps-git-user options regarding the later part, but it still does not work (at least for github) without any token

St4NNi avatar Dec 08 '21 16:12 St4NNi

I tried using the --apps-git-token and --apps-git-user but I still had no luck. My repo is on gitlab and I am trying to install the demo app

ldacey avatar Sep 17 '22 04:09 ldacey

Yeah, i had problems with privately hosted gitlab instances too. I found out where the issue was (at least for me) and opened a PR #215 a while ago, but got no response.

Edit: Okay, i have seen that they implemented a similar fix for themselves in 12750923c1737f73923bdbbeaa8b6a62295a2219

St4NNi avatar Sep 17 '22 07:09 St4NNi

@ldacey github.com/argoproj-labs/argocd-autopilot/examples/demo-app/ is getting you a 404, anyways. BUT it also does not works with eg argocd-autopilot app create podtato-head --app github.com/podtato-head/podtato-head/delivery/kustomize/base -p testing when having the argocd repo on gitlab, also have the GIT_TOKEN set to the gitlab token.

aeimer avatar Dec 14 '22 17:12 aeimer

I've the same problem. I tried the Turorial but my GitOps Repo is on Gitlab. That's why i added --provider gitlab during bootstrap.

But now when i try to create the app via argocd-autopilot app create demoapp --app github.com/argoproj-labs/argocd-autopilot/examples/demo-app/ -p prod

I get FATAL authentication required.

mueller-tobias avatar Mar 11 '23 15:03 mueller-tobias

Having the same issue. My repository is on a private Gitlab instance as well.

Codename-11 avatar Aug 04 '23 18:08 Codename-11

Got same issue, adding --git-server-crt "git.crt" and --type kustomize solved the issue for me.

rismalrv avatar Nov 06 '23 21:11 rismalrv