Description of the problem, including code/CLI snippet
GitLab API for remote mirror has an endpoint for retrieving SSH public key, if authentication method is set to ssh_public_key.
https://docs.gitlab.com/api/remote_mirrors/#retrieve-a-public-key-for-a-remote-mirror
But the ProjectRemoteMirror in this library currently doesn't have any support for the above endpoint.
|
class ProjectRemoteMirror(ObjectDeleteMixin, SaveMixin, RESTObject): |
|
@cli.register_custom_action(cls_names="ProjectRemoteMirror") |
|
@exc.on_http_error(exc.GitlabCreateError) |
|
def sync(self, **kwargs: Any) -> dict[str, Any] | requests.Response: |
|
"""Force push mirror update. |
|
|
|
Args: |
|
**kwargs: Extra options to send to the server (e.g. sudo) |
|
|
|
Raises: |
|
GitlabAuthenticationError: If authentication is not correct |
|
GitlabCreateError: If the server cannot perform the request |
|
""" |
|
path = f"{self.manager.path}/{self.encoded_id}/sync" |
|
return self.manager.gitlab.http_post(path, **kwargs) |
Expected Behavior
Ability to retrieve SSH public key for SSH based remote mirrors.
Actual Behavior
No option for retrieving SSH public key for SSH based remote mirrors.
Specifications
- python-gitlab version: 7.1.0
- Gitlab server version (or gitlab.com): 18.8.3
Description of the problem, including code/CLI snippet
GitLab API for remote mirror has an endpoint for retrieving SSH public key, if authentication method is set to
ssh_public_key.https://docs.gitlab.com/api/remote_mirrors/#retrieve-a-public-key-for-a-remote-mirror
But the
ProjectRemoteMirrorin this library currently doesn't have any support for the above endpoint.python-gitlab/gitlab/v4/objects/projects.py
Lines 1237 to 1251 in de116f9
Expected Behavior
Ability to retrieve SSH public key for SSH based remote mirrors.
Actual Behavior
No option for retrieving SSH public key for SSH based remote mirrors.
Specifications