multi-module-maven-release-plugin icon indicating copy to clipboard operation
multi-module-maven-release-plugin copied to clipboard

netcat does not support -U option

Open dcrissman opened this issue 7 years ago • 5 comments

OS: RHEL 7.3

I don't seem to have a 'netcat' application at all, however I do have a 'ncat' that does have a -U option. As far as I can tell, it is the same application.

Could the application try both?

[WARNING] Failed to connect to SSH-agent
com.jcraft.jsch.agentproxy.AgentProxyException: netcat does not support -U option.
	at com.jcraft.jsch.agentproxy.usocket.NCUSocketFactory.<init>(NCUSocketFactory.java:70)
	at com.github.danielflower.mavenplugins.release.SshAgentSessionFactory.createDefaultJSch(SshAgentSessionFactory.java:80)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:261)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:220)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:176)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:110)
	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:264)
	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:162)
	at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:198)
	at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:159)
	at com.github.danielflower.mavenplugins.release.LocalGitRepo.allRemoteTags(LocalGitRepo.java:186)
	at com.github.danielflower.mavenplugins.release.Reactor.getRemoteBuildNumbers(Reactor.java:120)
	at com.github.danielflower.mavenplugins.release.Reactor.fromProjects(Reactor.java:46)
	at com.github.danielflower.mavenplugins.release.NextMojo.execute(NextMojo.java:37)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

dcrissman avatar Oct 06 '17 18:10 dcrissman

All the SSH communications are handled by https://github.com/ymnk/jsch-agent-proxy and I'll admit I don't understand much of how it works.

You could raise a ticket there, or just try to get netcat working I suppose.

danielflower avatar Oct 07 '17 04:10 danielflower

I created https://github.com/ymnk/jsch-agent-proxy/issues/31 and will close this ticket as it is not a bug here.

dcrissman avatar Oct 07 '17 13:10 dcrissman

Same problem. OS: Fedora 29

gdubya avatar Mar 06 '19 21:03 gdubya

Any chance you can switch to the libraries that the original release plugin uses for all git related actions? This seems to be a problem on a lot of OS's, and makes running the plugin from Docker (i.e., in a CI/CD pipeline) tricky

paulharkink avatar Aug 06 '20 16:08 paulharkink

Last time I checked (which was years ago), the built in maven releaese plugin just used the git on the system. I don't want to rely on that, however I could try changing from the current ssh jgit plugin (jsch) to another one (apache mina). I don't really understand the problem so not sure if that would help or not.

danielflower avatar Sep 06 '20 15:09 danielflower