New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH: invalid privatekey when key has a passphrase #68

Closed
Yanson opened this Issue Jun 11, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@Yanson

Yanson commented Jun 11, 2015

When using an ssh repo, remote commands fail with:

Caused by: org.ajoberstar.grgit.exception.GrgitException: Problem pushing to remote.
Caused by: org.eclipse.jgit.api.errors.TransportException: git@example.com:org/project.git: invalid privatekey: xxxxxxx

I have narrowed this down to here where it is trying to add an identity based on the provided host-config but the identity key has a passphrase:
http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jgit/org.eclipse.jgit/3.7.0.201502260915-r/org/eclipse/jgit/transport/JschConfigSessionFactory.java#261

This usage is called from:

If instead of calling the super method, a default JSch is used as such:
jsch = new JSch(); jsch.setHostKeyRepository(defaultJSch.getHostKeyRepository());
...then the code continues down the path of using the ssh-agent and succeeds.

Hope you can help with this.

@ajoberstar

This comment has been minimized.

Owner

ajoberstar commented Jun 12, 2015

Not sure I'm entirely following your situation. Are you saying the issue is that it's picking up your keys from ~/.ssh and, due to the passphrase they have, it fails? By default, it should be prompting you for credentials if there is a passphrase (except for headless environments). Are you setting any of the org.ajobertar.grgit.auth system properties documented in AuthConfig to tweak the behavior?

If those questions seem to be missing the point, could you provide some more clarification?

@Yanson

This comment has been minimized.

Yanson commented Jun 12, 2015

Hi, thanks for getting back to me.

That's right, it's picking up the key from ~/.ssh as it found which key to use in ~/.ssh/config.

I've been running with -Dorg.ajoberstar.grgit.auth.force=sshagent but not sure that should be necessary. I don't get an auth prompt, but this wouldn't work for me anyway as it does need to run headless.

The point is that it can work without providing credentials if it uses the sshagent.

I verified this by debugging on this line and skipping the addIdentity call which is what throws the exception due to missing passphrase.
http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jgit/org.eclipse.jgit/3.7.0.201502260915-r/org/eclipse/jgit/transport/JschConfigSessionFactory.java#258

Cheers.

@ajoberstar

This comment has been minimized.

Owner

ajoberstar commented Jun 15, 2015

Can you provide a debug log for one of your failing builds? I'd like to see what, if any, of the messages from my code show up.

As default behavior, I think it should still be looking at those keys, just trying to determine what the proper workaround is for people in your situation.

@Yanson

This comment has been minimized.

Yanson commented Jun 15, 2015

Sure, here you are:

09:16:18.135 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':commitReleaseVersion'
09:16:18.136 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':commitReleaseVersion' is up-to-date
09:16:18.136 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':commitReleaseVersion' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
09:16:18.136 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':commitReleaseVersion'.
09:16:18.136 [LIFECYCLE] [org.gradle.api.Task] Commit a release project version in source control
09:16:18.165 [INFO] [org.ajoberstar.grgit.auth.TransportOpUtil] The following authentication options are allowed (though they may not be available): [INTERACTIVE, PAGEANT, HARDCODED, SSHAGENT]
09:16:18.165 [INFO] [org.ajoberstar.grgit.auth.TransportOpUtil] using interactive credentials, if needed
09:16:18.266 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':commitReleaseVersion'
09:16:18.266 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :commitReleaseVersion FAILED
09:16:18.266 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :commitReleaseVersion (Thread[Daemon worker,5,main]) completed. Took 0.131 secs.
09:16:18.266 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker,5,main]] finished, busy: 0.155 secs, idle: 0.002 secs
09:16:18.268 [ERROR] [org.gradle.BuildExceptionReporter] 
09:16:18.268 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
09:16:18.268 [ERROR] [org.gradle.BuildExceptionReporter] 
09:16:18.269 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
09:16:18.269 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':commitReleaseVersion'.
09:16:18.269 [ERROR] [org.gradle.BuildExceptionReporter] > Problem pushing to remote.
09:16:18.269 [ERROR] [org.gradle.BuildExceptionReporter] 
09:16:18.269 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
09:16:18.270 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':commitReleaseVersion'.
09:16:18.270 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
09:16:18.271 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
09:16:18.271 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
09:16:18.271 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
09:16:18.272 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
09:16:18.272 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
09:16:18.272 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
09:16:18.273 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
09:16:18.273 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
09:16:18.273 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
09:16:18.273 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
09:16:18.274 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
09:16:18.274 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
09:16:18.274 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
09:16:18.275 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
09:16:18.275 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
09:16:18.276 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
09:16:18.276 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
09:16:18.277 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
09:16:18.278 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
09:16:18.278 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
09:16:18.278 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:49)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
09:16:18.279 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.util.Swapper.swap(Swapper.java:38)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
09:16:18.280 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:71)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
09:16:18.281 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.ajoberstar.grgit.exception.GrgitException: Problem pushing to remote.
09:16:18.282 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.operation.PushOp.call(PushOp.groovy:117)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.operation.PushOp.call(PushOp.groovy)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at java_util_concurrent_Callable$call.call(Unknown Source)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at java_util_concurrent_Callable$call.call(Unknown Source)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.util.OpSyntaxUtil.tryOp(OpSyntaxUtil.groovy:45)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.Grgit.methodMissing(Grgit.groovy:188)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at com.example.gradle.java.plugins.scm.GitScm.push(GitScm.groovy:41)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at com.example.gradle.java.plugins.scm.GitScm.commitChange(GitScm.groovy:26)
09:16:18.283 [ERROR] [org.gradle.BuildExceptionReporter]    at com.example.gradle.java.plugins.release.ReleasePlugin$_apply_closure2_closure10.doCall(ReleasePlugin.groovy:51)
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:558)
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:539)
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter]    ... 57 more
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.eclipse.jgit.api.errors.TransportException: git@github.example.com:my-org/hello-world-app.git: invalid privatekey: [B@29dea8c3
09:16:18.284 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:160)
09:16:18.285 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:79)
09:16:18.285 [ERROR] [org.gradle.BuildExceptionReporter]    at java_util_concurrent_Callable$call$0.call(Unknown Source)
09:16:18.285 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.operation.PushOp.call(PushOp.groovy:114)
09:16:18.286 [ERROR] [org.gradle.BuildExceptionReporter]    ... 69 more
09:16:18.286 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.eclipse.jgit.errors.TransportException: git@github.example.com:my-org/hello-world-app.git: invalid privatekey: [B@29dea8c3
09:16:18.287 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)
09:16:18.287 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
09:16:18.287 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:320)
09:16:18.287 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:166)
09:16:18.287 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)
09:16:18.287 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.Transport.push(Transport.java:1200)
09:16:18.288 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
09:16:18.288 [ERROR] [org.gradle.BuildExceptionReporter]    ... 72 more
09:16:18.288 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@29dea8c3
09:16:18.288 [ERROR] [org.gradle.BuildExceptionReporter]    at com.jcraft.jsch.KeyPair.load(KeyPair.java:702)
09:16:18.288 [ERROR] [org.gradle.BuildExceptionReporter]    at com.jcraft.jsch.KeyPair.load(KeyPair.java:542)
09:16:18.288 [ERROR] [org.gradle.BuildExceptionReporter]    at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at com.jcraft.jsch.JSch.addIdentity(JSch.java:389)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at com.jcraft.jsch.JSch.addIdentity(JSch.java:349)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:261)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.auth.JschAgentProxySessionFactory.super$3$getJSch(JschAgentProxySessionFactory.groovy)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at org.ajoberstar.grgit.auth.JschAgentProxySessionFactory.getJSch(JschAgentProxySessionFactory.groovy:64)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:219)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:175)
09:16:18.289 [ERROR] [org.gradle.BuildExceptionReporter]    at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:109)
09:16:18.290 [ERROR] [org.gradle.BuildExceptionReporter]    ... 78 more
09:16:18.290 [ERROR] [org.gradle.BuildExceptionReporter] 
09:16:18.290 [LIFECYCLE] [org.gradle.BuildResultLogger] 
09:16:18.290 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
09:16:18.290 [LIFECYCLE] [org.gradle.BuildResultLogger] 
09:16:18.291 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 1.212 secs
09:16:18.291 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (/Users/Yanson/.gradle/caches/modules-2/metadata-2.15/module-metadata.bin)
09:16:18.293 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (/Users/Yanson/.gradle/caches/modules-2/metadata-2.15/artifact-at-repository.bin)
09:16:18.293 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/Users/Yanson/.gradle/caches/modules-2).
09:16:18.293 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file '/space/hello-world-app/build.gradle' (/Users/Yanson/.gradle/caches/2.4/scripts/build_2358nq9fk3zkh8nbp8ztx19x0/ProjectScript/buildscript).
09:16:18.294 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/space/hello-world-app/build.gradle' (/Users/Yanson/.gradle/caches/2.4/scripts/build_2358nq9fk3zkh8nbp8ztx19x0/ProjectScript/no_buildscript).
09:16:18.294 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for script '/space/hello-world-app/repository.gradle' (/Users/Yanson/.gradle/caches/2.4/scripts/repository_86hcjrv01sbkighax5trcss1k/DefaultScript/buildscript).
09:16:18.294 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for script '/space/hello-world-app/repository.gradle' (/Users/Yanson/.gradle/caches/2.4/scripts/repository_86hcjrv01sbkighax5trcss1k/DefaultScript/no_buildscript).
09:16:18.294 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin Resolution Cache (/Users/Yanson/.gradle/caches/2.4/plugin-resolution) was closed 0 times.
09:16:18.294 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
09:16:18.294 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
09:16:18.295 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache task history cache (/space/hello-world-app/.gradle/2.4/taskArtifacts) was closed 0 times.
09:16:18.295 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedRepositoryFactory] In-memory dependency metadata cache closed. Repos cached: 2, cache instances: 2, modules served from cache: 3, artifacts: 3
09:16:18.296 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
09:16:18.297 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolved configuration cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
09:16:18.297 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.002 secs
09:16:18.297 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
09:16:18.351 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: CloseInput[id=6e11f81a-e31d-49ce-9345-7b851194fa50.2]
09:16:18.352 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 13: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
09:16:18.354 [INFO] [org.gradle.launcher.daemon.client.DaemonClient] Received result CommandFailure[value=org.gradle.launcher.exec.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':commitReleaseVersion'.] from daemon DaemonInfo{pid=644, address=[243839c3-a6e1-4da6-ad77-eadf6bd6fadb port:49449, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=73ec96ca-cf5e-41d5-a6cb-a7c20abdac97,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home,daemonRegistryDir=/Users/Yanson/.gradle/daemon,pid=644,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=US-ASCII,-Duser.country=US,-Duser.language=en,-Duser.variant]}.
09:16:18.354 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
09:16:18.356 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
@Yanson

This comment has been minimized.

Yanson commented Jun 17, 2015

Hi,

I know this is a horrible hack, but is working for me in the mean time:
Yanson@0495861

Cheers,
Iain

@ajoberstar

This comment has been minimized.

Owner

ajoberstar commented Jun 17, 2015

Yeah, I'd like to have something a little cleaner than that, but it's at least something to reference. I haven't had a chance to think too much about the solution yet, but I would like to fix this.

@ajoberstar ajoberstar added the bug label Jul 20, 2015

@ajoberstar ajoberstar added this to the 1.4.0 milestone Jul 20, 2015

@ajoberstar ajoberstar closed this in a2469e5 Aug 7, 2015

@Yanson

This comment has been minimized.

Yanson commented Mar 10, 2016

I tried to move back to your version by there is a case-mismatch in the method so it fails.

-createDefaultJsch
+createDefaultJSch

Could you make this change?

Thanks,
Iain

@msiuts

This comment has been minimized.

msiuts commented Sep 9, 2016

Just as an information for others:
I had problems with my known_hosts file (must be some invalid lines or such) which triggered the fallback and so the incorrect method call to createDefaultJsch.

There was no log output about the invalid known_hosts file, but cleaning it solved the issue.

The only output was:

Caused by: groovy.lang.MissingMethodException: No signature of method: org.ajoberstar.grgit.auth.JschAgentProxySessionFactory.createDefaultJsch() is applicable for argument types: (org.eclipse.jgit.util.FS_POSIX) values: [org.eclipse.jgit.util.FS_POSIX@7610f75a]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment