Skip to content

Unable to detect new host key for pull mirrors when host key changes

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

In our docs for pull mirroring we have a section that discusses host key verification failed

## Host key verification failed

This error is returned when the target host public SSH key changes.
Public SSH keys rarely, if ever, change. If host key verification fails,
but you suspect the key is still valid, you can refresh the key's information.

Prerequisites:

- You must have at least the Maintainer role for a project.

To resolve the issue:

1. [Verify the host key](index.md#verify-a-host-key).
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Settings > Repository**.
1. Expand **Mirroring repositories**.
1. To refresh the keys, either:

   - Select **Detect host keys** for GitLab to fetch the host keys from the server, and display the fingerprints.
   - Select **Input host keys manually**, and enter the host key into the **SSH host key** field.

- Select **Mirror repository**.

It seems like this functionality doesn't exist for existing mirrors. We originally added this documentation in Host SSH key changes (!116362 - merged) however, this comment shows screenshots of the form to create new mirrors.

If a mirror's host changes their ssh key users currently need to delete the mirror and recreate it.

Users should be able to simply click a button to re-verify the host for existing mirrors.

Edited by 🤖 GitLab Bot 🤖