thingworx-gitbackup-extension icon indicating copy to clipboard operation
thingworx-gitbackup-extension copied to clipboard

Push failure to Bitbucket Repo

Open vamsikoppuravuri-git opened this issue 10 months ago • 4 comments

Hi, I am using the latest version of this extension (v5.0.1) with ThingWorx 9.5.0.

I have set up my Bitbucket repository and configured the extension according to the documentation. Initially, I authenticated using my username and password, which allowed me to read remote branches from the Bitbucket repository. However, when I attempted to push some sample files to the main branch, the operation failed.

Later, I discovered that Bitbucket no longer supports username/password authentication for Git operations. To resolve this, I created an App Password and updated my previously configured GitBackupThing to use the App Password instead of the regular password.

Despite this change, I am still encountering the following error in the logs when attempting a push.

Image

To verify whether my App Password works, I tested pushing from my VS Code editor, where I provided the App Password, and it worked successfully.

Could you please clarify the following:

  • Is Bitbucket still supported?
  • If so, does it support authentication via App Password?
  • If yes, how can I resolve this error?

Appreciate your help.

Thanks, VK

vamsikoppuravuri-git avatar Feb 07 '25 12:02 vamsikoppuravuri-git

Hi @vamsikoppuravuri-git Can you please let me know the name of the entity where you updated the newly created app password? I'm assuming you read the Git Extension User Guide corresponding to that version and you observed that credentials are no longer stored at the Git Repository level?

vrosu avatar Feb 11 '25 14:02 vrosu

Hi @vrosu, I have gone through the document and got to know that the credentials are getting stored on User entity but not at Git Repository level.

Image

And I have updated the Bitbucket App Password from below UI but not from composer.

Image

Pull from Bitbucket is working with the App Password but Push is giving the error in ThingWorx.

vamsikoppuravuri-git avatar Feb 11 '25 14:02 vamsikoppuravuri-git

Hi @vamsikoppuravuri-git

  1. Did you upgrade to the GitExtension 5.0.1 from an older version or you installed it directly in a clean ThingWorx instance?
  2. [in case of upgrade] Did you remove the previous GitBackup Things as mentioned in the documentation, or reused them as they were? In this situation, can you please delete the GitBackup Things, recreate them, then retest the Push?
  3. In case there is a bug in the UpdateRepo Service, can you please update the password directly in Composer? It would be great if you can compare the existing password hash with the one after the update, to see if there is a difference. In my testing this did not happen, but maybe there's something else here I did not account for.

vrosu avatar Feb 11 '25 20:02 vrosu

Hi @vrosu,

  1. Did you upgrade to the GitExtension 5.0.1 from an older version or you installed it directly in a clean ThingWorx instance? <VK> No, it's a clean install (Extn v5.0.1, TWX v9.5.0)

  2. [in case of upgrade] Did you remove the previous GitBackup Things as mentioned in the documentation, or reused them as they were? In this situation, can you please delete the GitBackup Things, recreate them, then retest the Push? <VK> Not Applicable

  3. In case there is a bug in the UpdateRepo Service, can you please update the password directly in Composer? It would be great if you can compare the existing password hash with the one after the update, to see if there is a difference. In my testing this did not happen, but maybe there's something else here I did not account for. <VK> I attempted to log the password and noticed that the App Password is now recognized. I created a new Git Thing and tried again, but I'm still encountering the same error. Could it be that some permissions are missing in ThingWorx for the push service, as it indicates 'not authorized'?

vamsikoppuravuri-git avatar Feb 12 '25 07:02 vamsikoppuravuri-git