Skip to content

Expose host keys for push mirrors

What does this MR do and why?

Contributes to #514005 (closed)

Problem

Host key fingerprints are not available via REST API.

Solution

Extend the remote mirror response to return host keys.

References

Add API endpoint to retrieve SSH public key for... (#514005 - closed)

Screenshots or screen recordings

Screenshot_2025-09-08_at_16.34.41

How to set up and validate locally

  1. Visit a project Settings -> Repository -> Mirroring repositories

  2. Create a new push mirror

    1. For URL type ssh://gitlab.com
    2. Click on "Detect host keys" button
    3. Click on "Mirror repository" button
  3. Visit REST API endpoint for push mirrors (similar to http://gdk.test:3000/api/v4/projects/12/remote_mirrors)

  4. Confirm that host keys fingerprints are present in the response

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #514005 (closed)

Edited by Vasilii Iakliushin

Merge request reports

Loading