Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

azadcreative's avatar

Unable to deploy your site because your Bitbucket token is invalid for this repository or has expired

  1. The site was properly deployed.

  2. We checked by ssh-ing into the server. The repo was cloned, composer was installed migrations run. Perfect!

  3. Pushed some new code into the master branch.

  4. Clicked on deploy. Showing this error:

Whoops! There were some problems with your input.

We were unable to deploy your site because your Bitbucket token is invalid for this repository or has expired. Please refresh the token in your Forge account profile's "Authentication" tab.`

  1. Went to My Account > Source control. Refresh token.

  2. No dice.

  3. Unlinked Bitbucket and linked it again. No dice.

  4. Uninstalled repository (including rollback migrations) and re-installed (after refreshing the token again). NO DICE!

  5. Deleted the server. Unlinked Bitbucket.

  6. Created new server. Linked Bitbucket again. Added the new server's publickey to the repo settings. Click DEPLOY and IT'S DEPLOYED! Perfect.

  7. The next time we push new code to Bitbucket, Clicked on "Deploy Now". SHOWING THE SAME ERROR.

  8. ssh into the DigitalOcean server and 'git pull' - works seamlessly.

I have wasted 12 hours on this issue. Tried every possible way.

Experts, please advice.

0 likes
4 replies
cshelswell's avatar

Exactly the same problem here unfortunately. - Not sure I can figure it out myself.

I'm going for the manual git pull too at the moment :(

_chris's avatar

Also having this issue

Edit: solved by hitting the 'update git remote' setting under the site tab

2 likes
Shadowed's avatar

Same issue here - Tried the 'update git remote' and is not working for me.

1 like

Please or to participate in this conversation.