Whilst adding a repository alongside a new project is easy with the OAuth method, you may wish to update an existing project's repository settings rather than create a new project, especially if you wish to keep the previous deployment history.
Firstly, you'll need to navigate to the Configuration link below Repository on the left hand side of your project, then change the Full repository URL.
Where you're connecting via SSH as in most cases, you'll need to upload the project's public key to your new repository. You'll find this directly below the repository URL.
You can find information about how to upload the public key to our main supported hosts below:
- Uploading your project's public key to Bitbucket manually
- Uploading your project's public key to Codebase manually
- Uploading your project's public key to GitHub manually
- Uploading your project's public key to GitLab manually
Otherwise, if you're connecting via HTTP, just update your username and password, if required. Click Update Repository, then DeployHQ will recache it from the new location.
Once you've updated the repository, you'll need to ensure you deploy from the correct revisions. In particular, if the last deployed commit to any servers in your project doesn't exist in the new repository.
Just click the orange commit selector icon to the left of the start commit, then either choose a previous commit found in your new repository, or the option to Deploy the entire repository at the bottom.