Connect local repository to published plugin Forge

Hello everyone,
I have a problem with my Forge App.
I’ve published the App in the marketplace and everything was fine.

After that I had to change my laptop and I clone the repo from bitbucket.

Now I want to publish a fix that I made, but I get “AUTHORIZATION_FAILED” error when I try to deploy, so I discovered that my local app is no longer linked to the one I have in my developer portal.

How can I link the Apps in order to deploy my fix?

Thanks a lot!

Your new laptop probably has a new SSH key that Bitbucket doesn’t recognise. You should login to Bitbucket in your web browser and configure SSH authentication for your new laptop: Configure SSH and two-step verification | Bitbucket Cloud | Atlassian Support

Alternatively you can clone your repo using HTTPS instead of SSH, in which case you will get prompted for your password when pushing.

When you say deploy, you mean the forge deploy command?

One thing that I had in the past was that I’ve used my wrong Atlassian account.
An app that is deployed to the Marketplace is associated with a single account (Jira Developer Account for multiple users - #2 by ibuchanan). As part of the initial deployment in the manifest.yml it stores a unique app id.
To deploy the the existing code to another Atlassian account there is a command to get a new app id for the other account. If I’m not wrong it was forge register command. Otherwise you won’t be able to deploy.

Maybe first check if you have logged in with the correct account forge whoami.

Thanks all for the reply!
@HeyJoe the problem isn’t to push my code in bitbucket, but deploy/publish my fix in the marketplace plugin.
@tied Yes, I mean forge deploy command.
I’m logged in with the same account I use to log me into the Developer Console (where I see my published plugin).
The problem with forge register is that it will create another App in the Developer Console instead of update/upgrade the one I have published in the marketplace.
As you said, I see two different App ID between bitbucket vs the app in Developer Console.
It’s enough to force the change of this ID in my local code to set it like the one I have in Developer Console?

If booth ids are connected to the same account I would assume this could work. But never tested.

It worked!
I changed manually the APP ID and I was able to deploy the new version!

Thank you!