Unable to publish test assets to a Control repository
When you attempt to publish test assets from HCL DevOps Test Hub (Test Hub) to a Control repository, the publish operation might fail with the following message: Remote rejected; pre-receive hook declined.
Cause
The branch protection rule that is configured in Control prevents Test Hub from pushing test assets directly to the main branch.
Resolution
You must publish the test assets to a new branch, and then merge the changes into the main branch through a pull request.
Perform the following steps:
- Create a branch in
Control.
For example, ui_test.
- Select the newly created Control branch from the Branch list in
Test Hub.
For example, ui_test.
- Create an Edit branch.
For example, ui_test_sub. This is a local branch that you can merge into ui_test that you created.
- Create test assets or make changes to the existing assets.
- Go to .
- Select the Control branch from the Branch
list.
For example, ui_test. All the updated assets that are present in the Edit branch are displayed in the Changes page.
- Click
Publish.
The Publish dialog is displayed.
- Enter a description for the changes that you performed to the asset, and then click Publish.
- Create a pull request from the newly created branch to the main branch in Control.
- Review and merge the pull request into the main branch.