For the complete documentation index, see llms.txt. This page is also available as Markdown.

"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 GitProtect 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 GitProtect Management Service side panel, find the target Git organization, and click Edit to add the new token or update the existing one.

  • 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.

Last updated

Was this helpful?