400 error on deploy - Look here for Bitbucket deployment issues

I am getting a error on deployment

Error deploying the web app. Response code 400 (Bad Request)

I did lots of deployment today, and now getting this error.

Hey @willmkt,

It looks like we’re having issues with Bitbucket profiles after the migration unfortunately… :disappointed:

We’re looking into fixing an issue with Reauthenticating Bitbucket profiles. In the mean time, you can create a new VC profile and edit the settings of the app to use the new profile, and then redeploy.

I’m sorry for this inconvenience!

Hi @amiedema,

I created another profile and it worked fine,

Thanks

1 Like

Awesome - thanks for letting me know!

Just a side note for others who may run across the same issue after the transition from Cleavr 1.0 to 2.0 - we’ve looked into the issue multiple times (had multiple devs look at it) but honestly, everything looks correct so we are at a bit of a loss…

We’ll need to continue to suggest creating a new Bitbucket profile for the time being.

Hey @amiedema, the problem is back!

Now every time i have to reauthenticate the profile, so them i can make the deploy.

:man_facepalming:

We haven’t made any related changes lately… We’ll do some more testing and dig into it more.

ok, thanks for the feedback

Hi @amiedema,

Just realized that the problem is on the push to deploy, everytime i deploy it gives a error.

If i go on the dashboard and deploy it works.

Thanks for the additional info!

I’ll see if I can repro this on my side but I may need to PM you if I’m unable to.

1 Like

:pensive: I can’t seem to repro this unfortunately…

Where do you see the error? Is it on one of the deployment steps in Cleavr? Does it show in Bitbucket?

If i activate push to deploy and commit a change, the deploy will fail

Just checked the logs, it fails to authenticate on bitbucket

remote: Invalid username or password
fatal: Authentication failed for ‘https://bitbucket.org/Fletor/fletor/

We’ve pushed out a fix that hopefully resolves issues with Bitbucket VC profiles not working as expected.

This fix does require that you create a brand new Bitbucket VC Profile in connection profiles > VC profiles.

After you add the new Bitbucket VC profile, go to the web apps that are associated to the old vc profile and then update them to the new one and fill out the repo / branch-to-deploy info.

We hope this resolves the issue!

We apologize for the inconvenience!

1 Like

Hi,

I don’t know whether to create a new topic or not, as I found the same issue happening to me when I do a push to my bitbucket. A manual deploy works as per normal

Perhaps the issue is not resolved yet?

Hello @numnum.me,

There might be some other issues, we’re keeping an eye on it to find out the issue and get it fixed.

Hi @numnum.me,

Can you please let us know more about the Bitbucket account setup - such as, is this an organization/team account? Was the VC Profile in Cleavr setup using a team member’s Bitbucket account or was it created using the team Bitbucket account? Does the bitbucket account used to create the VC profile have admin privileges for the repo?

Also, in repository settings > webhooks, is the cleavr web hook listed and set to be triggered for on a push?

Sorry for all of the questions, I’m trying to reproduce the error but haven’t been able to duplicate it yet…

Hi,

Allow me to answer some of your questions as best as possible

  • is this an organization/team account?
    It should be a ‘personal’ account as the bitbucket profile is using my email

  • Was the VC Profile in Cleavr setup using a team member’s Bitbucket account or was it created using the team Bitbucket account?
    It was created using my Bitbucket account

  • Does the bitbucket account used to create the VC profile have admin privileges for the repo?
    Yes, it should have the admin privileges. Perhaps to give some weight into this, this repo previously was pushed to N**lify as a SPA with no problems. So I hope this gives some light into the permission question?

  • In repository settings > webhooks, is the cleavr web hook listed and set to be triggered for on a push?
    Seems there are multiple web hooks. Could this be an issue

Regards,

Andy

Hey Andy,

Thanks for the added details!

So, this is just on your personal Bitbucket account? That should narrow it down quite a bit.

For the extra hooks that show up, that should not be the issue. At least, it didn’t produce the issue for me when I reproduced additional hooks. You could try removing them and then disabling / re-enabling push-to-deploy in Cleavr to rule it out for good.

Another thing you can try is in Cleavr go to server > ssh, and then copy the ‘public SSH key for external services’ and then add that to your Bitbucket account under your profile > personal settings > ssh keys.

Cleavr go to server > ssh, and then copy the ‘public SSH key for external services’ and then add that to your Bitbucket account under your profile > personal settings > ssh keys.

Hi,

I’ve added Cleavr’s public ssh key to my bitbucket ssh keys, pushed to my repo, but it still says authentication failed.

Perhaps I need to re-do the linking up of the ‘code repository’ or all the way back to ‘VC profile’?

Yes - give adding a new VC profile and then updating your project with the new profile and then try push-to-deploy again. Please let us know if that works or not.