carlossg / docker-maven

Official Docker image with Maven
Apache License 2.0
524 stars 423 forks source link

Removed ssh-client #339

Closed jonesbusy closed 1 year ago

jonesbusy commented 1 year ago

Hi,

It seems the SSH-client was removed from the maven:3.9.0-eclipse-temurin-11 image. Was available on maven:3.8.7-eclipse-temurin-11

docker run -it maven:3.8.7-eclipse-temurin-11 ssh -V
OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
docker run -it maven:3.9.0-eclipse-temurin-11 ssh -V
/usr/local/bin/mvn-entrypoint.sh: 50: exec: ssh: not found

When performing maven release it's sometime useful to configure ssh option when performing git push command. Specially from a CI (GIT_SSH_COMMAND env var).

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M7:prepare (default-cli) on project ********: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] ssh   -i "$SSH_KEY" -o UserKnownHostsFile=$KNOWN_HOSTS: 1: ssh: not found
[ERROR] fatal: Could not read from remote repository.

Not sure if the side effect of the temurin parent image, but is not possible to have the ssh-client available ?

Thanks.

carlossg commented 1 year ago

this must have been removed from the parent eclipse-temurin:11-jdk image

cstamas commented 1 year ago

Default git provider for maven-scm is get-exe (invokes git CLI), this means that in image git CLI is defunct.

carlossg commented 1 year ago

see https://github.com/carlossg/docker-maven/pull/340#issuecomment-1467883333