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

rephiscorth's avatar

We renamed our repository at bitbucket

We would like to avoid uninstalling and reinstalling the repo, as we'd have to set up SSL, workers and many other things and it will make us lose time. I SSH'd into the server, changed the origin remote url with git remote set-url [bitbucket's url ending in .git] and ran git pull origin develop (it's a staging server) and it pulled from bitbucket perfectly. However, pressing "Deploy Now" button (or running wget [deployment trigger url] from CI server) results in an error that says 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.. Needless to say, following that instruction didn't work, which makes me thing that's just a general error message.

What am I missing?

0 likes
4 replies
willvincent's avatar

Have you updated your token in the forge account? It's entirely possible that a mismatch of repo name could cause a token to fail an authentication check. If you generate a new token for the repo on bitbucket, and update the forge side with the new token, does that resolve the issue?

rephiscorth's avatar

@willvincent I only went to my profile tab (on forge) and hit the "Refresh token" button (as per instructions on the error message). But I don't really know what does it do (backstage). By your response, I suppose before hitting said "Refresh Token" I should have went to my Bitbucket account, and generate a new token for the repo, and finally press the refresh token button.

If this is correct, could you guide me where do I generate said token on Bitbucket (as I already searched on the repo settings but couldn't find anything that looked like a generate token for forge option).

Thanks in advance.

willvincent's avatar

I don't really use bitbucket, and have never used forge.. sorry.

bristoldigital's avatar

The issue is that Forge displays the original Repo name, but BitBucket/GitHub has the new name.

It seems the only solution is to uninstall the Repo from Forge and readd the App.

The "refresh token" error is a red herring.

Please or to participate in this conversation.