> For the complete documentation index, see [llms.txt](https://helpcenter.xopero.com/xopero-one-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.xopero.com/xopero-one-en/common-issues/devops/dv9039-failed-to-restore-repository-push-was-rejected-error.md).

# "DV9039: Failed to restore repository – push was rejected" error

How to troubleshoot the repository restore error.

### ⚠️ Issue

**Git** repository restore task fails with a **"DV9039: Failed to restore repository – push was rejected"** error.

***

### 💡 Cause

This issue typically occurs during a **Git** repository restore operation when **Xopero ONE** attempts to run `git push` to the target repository, but the push is rejected by the server. The primary cause is security policies or organization-level restrictions that actively block push operations on the target repository.

***

### 🔧 Resolution

Depending on your setup, there are a few ways to resolve this issue:

* Temporarily disable branch protection on your **Git** provider's side.
* Update your PAT, API token, or **GitHub App** permissions.
* Generate a new PAT or API token with the required permissions. Then, go to the **DevOps** tab in the **Xopero ONE Management Service** side panel, find the target **Git** organization, and click **Edit** to add the new token or update the existing one.

{% hint style="warning" %}
Restoring branch protection rules requires a token configured with write access to the target repository.
{% endhint %}

* During the restoration process, in the **Restore to** section, create a new repository rather than selecting an existing one.
* If your repository includes large files, ensure the target server has sufficient storage capacity, and the **Git** LFS extension is enabled.
