Implement API endpoint to get the SSH public key from pull mirror configurations
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=360112) </details> <!--IssueSummary end--> <!-- This template is a great use for issues that are feature::additions or technical tasks for larger issues.--> ### Proposal Expose an endpoint for Public Keys in Mirror configuration. <!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. --> Original blurb written to support with motivation: ``` Hi! Working on automating the setup of import+pull mirroring of over 200+ repos from Bitbucket to GitLab. I would prefer to use SSH auth and not password based authentication, setting up the mirrors seems easy enough, but I can’t find any endpoint where I can access the public key that has been generated during the setup? Going to need all the different keys made so that I can authorize them in Bitbucket. When checking the settings, there is no API call there either, the ssh public key is already preloaded into the page DOM. https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/views/projects/mirrors/_table_pull_row.html.haml#L20 ``` Workaround: Can be extracted via the rails console ```ruby project_ids = [ 1, 2, 3 ] project_ids.each do |pid| proj = Project.find_by(id:pid) puts "#{proj.name}: #{proj.import_data.ssh_public_key}" end ``` <!-- Consider adding related issues and epics to this issue. You can also reference the Feature Proposal Template (https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Feature%20proposal%20-%20detailed.md) for additional details to consider adding to this issue. Additionally, as a data oriented organization, when your feature exits planning breakdown, consider adding the `What does success look like, and how can we measure that?` section. --> <!-- Label reminders Use the following resources to find the appropriate labels: - https://gitlab.com/gitlab-org/gitlab/-/labels - https://about.gitlab.com/handbook/product/categories/features/ -->
issue