All Collections
Help & Troubleshooting Guides
Deployment & CodeMagic
GitHub Deployment Failed With Error: Failed to Set the Repository Head
GitHub Deployment Failed With Error: Failed to Set the Repository Head

Happen when you deploy to ios and Android store from your Github branch.

David avatar
Written by David
Updated over a week ago

This article walks through troubleshooting steps for "Failed to set the repository head." If you're not sure which type of error your project has, check out this article on how to identify your Codemagic error.

Issue

You are trying to deploy to iOS or Android stores from your GitHub branch and it fails with the message "Failed to set the repository head."

Full Error Message

Failed to set the repository head

Common Causes for "Failed to Set the Repository Head"

  • The repository you are trying to deploy to does not exist or you do not have permission to access it.

  • The branch you are trying to deploy to does not exist or you do not have permission to write to it.

  • There might be an API connectivity issue that could prevent the project from being deploying.

  • There is a network issue preventing you from accessing the repository.

  • There is a problem with the code or files you are trying to deploy.
    โ€‹

Troubleshooting Steps

  • Make sure that you have entered the correct repository name and branch name.

  • Check that you have permission to access the repository and branch you are trying to deploy to.

  • Check your network connection to ensure that you are able to access the repository.

  • If you are deploying code, make sure that it builds and runs correctly locally before trying to deploy it.

Did this answer your question?