http error code 400 when bitbucket-server running behind awselb #30180
Unanswered
mwiede
asked this question in
Request Help
Replies: 1 comment
-
I'm experiencing the same issue with a very similar setup. Bitbucket DC hosted in AWS and with renovate config |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What would you like help with?
I think I found a bug
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
bitbucket-server 8.9.14
Please tell us more about your question or problem
We have changed our configuration from
RENOVATE_PASSWORD
toRENOVATE_TOKEN
and withpersistRepoData: true
, with any next run, we retrieve http 400 errors from bitbucket server.I activated the simple-git debug to see what is happening and I could see, that
http.extraheader=Authorization: Bearer xxx
was set. Nothing wrong so far. I also setGIT_CURL_VERBOSE=true
and now could see the issue: The Authoriation header is sent twiceBut bitbucket was not returning the 400 response, it was the awsalb, which does not accept that. I asked AWS support, and they confirmed:
The issue seems to be related to #22894 and git-lfs/git-lfs#4031 because in this setup we have two locations where the header is set:
http.extraheader
, the repo folder contains a.git/config
containing the auth headerSo basically, one can reproduce this issue with or without renovate:
first run, repo does not exist on disk: ✅
second run, repo is already on disk, renovate fails while doing git ls-remote: ❌
I think the issue can be solved by setting the
http.extraheader
before clone command and not after, so that it does't get persisted in the local git repo config file. I suggest to divide clone options and auth options in the related code.Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions