• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Forwarded to devs Plesk Git pull deploys wrong branch

Duarte N

New Pleskian
Username:

TITLE

Plesk Git pull deploys wrong branch

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian v18.0.72_build20250915.05 os_Windows 2016/2019/2022/2025

PROBLEM DESCRIPTION

After updating Plesk, when performing "Pull now" on a Git repository via the Plesk Git extension, the repository branch is unexpectedly switched to the default repository/branch defined in Git.
In the Plesk GUI the selected repository/branch appears correct, but in the file
vhosts\domain.com\git\test.domain.com\HEAD
the branch reference is overwritten with the default one.

STEPS TO REPRODUCE

  1. Configure a Git repository in Plesk and set it to use a branch other than the default (e.g. staging).
  2. Verify in the Plesk GUI that the selected branch is correct.
  3. Execute "Pull now" from the Plesk Git interface.
  4. Check the file vhosts\domain.com\git\test.domain.com\HEAD.

ACTUAL RESULT

The file HEAD is modified to point to the default branch (e.g. master).
As a result, even though the GUI shows staging, the content deployed corresponds to master.

EXPECTED RESULT

The HEAD file should remain pointing to the branch selected in the Plesk GUI (e.g. staging) and the deployment should be executed from that branch.

ANY ADDITIONAL INFORMATION

The bug appeared after Plesk update to version Plesk Obsidian 18.0.72 Update 2 and/or Update 3 and not from a Git extension update.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Thank you for the report, @Fullscreen . The behavior is confirmed as a bug with ID EXTGIT-350. At this point, I cannot provide a workaround or an ETA for the fix. I will follow-up with more details as soon as possible.
 
Thank you for the report, @Fullscreen . The behavior is confirmed as a bug with ID EXTGIT-350. At this point, I cannot provide a workaround or an ETA for the fix. I will follow-up with more details as soon as possible.
Hi. Any news? This bug is causing several problems in one of our servers, we have than 400 websites that we need to do deployments in a day based.
 
@Alfonso Uritec , our team is still working on fixing the issue. In the meantime, the workaround they proposed is to:

1. Switch the branch from the target one (e.g. development) to any other (e.g. main)
2. Switch back to the target branch (e.g. development)
3. After that you should see the actual files and commits.

I hope that helps.
 
Thanks for the reply

Yes, your workaround worked once (the first day that we noticed the issue), but when I pushed to the dev branch the changes in Plesk were reverted and it overwrote everything again.
So now we're locked without being able to use that dev branch.
 
Instead of using the Plesk interface for git while waiting on the development team to fix it, why not use the SSH terminal? The git commands still works for switching branches and such.
 
Instead of using the Plesk interface for git while waiting on the development team to fix it, why not use the SSH terminal? The git commands still works for switching branches and such.
You might think that I'm stupid, but I've never used SSH with Plesk and I don't have any idea about how to enable it. And I would prefer not to open any new port that will be scanned by all the attackers.
 
No ports needed to be open, plesk has a SSH terminal built in (at both the root level and domain level, although in this case you would want domain level which needs to be enabled at the domain level).

Just need to go to the domain > Hosting & DNS > Hosting
raw


Scroll down to SSH access and set the type then save
-- By default it's set to Forbidden
-- You will see many different kinds, but I would recommend using /bin/bash since it gives you better syntax

Once it's enabled, switch back to Dashboard and you will now have the SSH Terminal button.
raw

Click on that to get access to the terminal and you can do whatever (this is done at the user level of the domain thus why I recommend it doing this way to ensure proper permissions and what not).
 
No ports needed to be open, plesk has a SSH terminal built in (at both the root level and domain level, although in this case you would want domain level which needs to be enabled at the domain level).

Just need to go to the domain > Hosting & DNS > Hosting
raw


Scroll down to SSH access and set the type then save
-- By default it's set to Forbidden
-- You will see many different kinds, but I would recommend using /bin/bash since it gives you better syntax

Once it's enabled, switch back to Dashboard and you will now have the SSH Terminal button.
raw

Click on that to get access to the terminal and you can do whatever (this is done at the user level of the domain thus why I recommend it doing this way to ensure proper permissions and what not).
Thank you for your time
Your instructions are very clear but I don't have that SSH option in the Hosting pane.
I guess that this applies only to Linux hosting and we're using a windows server
 
Back
Top