maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Georgeson (JIRA)" <>
Subject [jira] (MRELEASE-868) Allow passing in SSH key via parameter for Git releases
Date Fri, 23 Jan 2015 20:50:18 GMT


Justin Georgeson commented on MRELEASE-868:

I'm thinking it's deeper than that, in Git itself. Git doesn't have an option to specify your
private key. It relies on SSH knowing what key to use. The standard practice is to write an
ssh wrapper script that allows specifying the key via env variable, and then using GIT_SSH
env variable to have Git run that wrapper script instead of running SSH directly. This appears
to be how the Jenkins Git Plugin works in tandem with the SSH Credentials plugin to support
putting a private key as a Jenkins credential and doing Jenkins using that credential to do
the Git clone. So the M2 Release plugin would have to do this

# Support username/password and SSH key Credentials instead of text fields for username/password
# When Credentials are SSH key store in Jenkins write the key to a private temp file
# When SCM is Git write a private temp shell/batch script file to run ssh -i _file/from/step2_
and set GIT_SSH env var
# Execute release workflow
# Delete files from steps 2 and 3

> Allow passing in SSH key via parameter for Git releases
> -------------------------------------------------------
>                 Key: MRELEASE-868
>                 URL:
>             Project: Maven Release Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.4.2
>            Reporter: Konrad Windszus
> When triggering a release from a shared server (e.g. a globally shared jenkins), it is
useful to let the release manager use his own credentials for the release. The release plugin
from supports that for username,
password authentication. In case of SSH authentication I cannot inject anything, because the
maven-release-plugin does not provide that option. It would be great if you could allow to
pass in an arbitrary SSH key (together with a passphrase) to be used during the release.
> That should work with jGit and Native Git.

This message was sent by Atlassian JIRA

View raw message