argoproj-labs / argocd-autopilot

Argo-CD Autopilot
https://argocd-autopilot.readthedocs.io/en/stable/
Apache License 2.0
892 stars 121 forks source link

Can't run `repo bootstrap` with Bitbucket Server #473

Open consal opened 1 year ago

consal commented 1 year ago

Our company has an on-prem Bitbucket deployment. I created an HTTP token in my Bitbucket user profile with the necessary permissions and exported it as GIT_TOKEN image

When running the command, I get the error authentication required.

export GIT_REPO="https://bitbucket.company.com/scm/~myuser/argocd-autopilot.git"
argocd-autopilot repo bootstrap --provider bitbucket-server
INFO cloning repo: https://bitbucket.company.com/scm/~myuser/argocd-autopilot.git
FATAL authentication required

Things I tried:

Without success. Can it work with an on-prem bitbucket?

jinxmcg commented 1 year ago

You need to create a app password not access token. Go to: https://bitbucket.org/account/settings/ and copy USERNAME then go to: https://bitbucket.org/account/settings/app-passwords/ and create a app password

export GIT_TOKEN="THE APP PASSWORD TOKEN"
export GIT_REPO="https://bitbucket.org/YOURUSER/YOUR_REPO.git"
export GIT_USER="USERNAME"

argocd-autopilot repo bootstrap --provider bitbucket

if it's on prem provider should be --provider bitbucket-server probably

todaywasawesome commented 1 year ago

Yes bitbucket-server would be the right one to use. https://argocd-autopilot.readthedocs.io/en/stable/commands/argocd-autopilot_repo_bootstrap/#options

@consal were you able to get it working?