java.lang.RuntimeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Summary Following a recent change to Bitbucket Cloud's SSH infrastructure, when using Bamboo's built in jgit to perform SSH checkouts from Bitbucket Cloud (i.e. when the repository is set up as the type of Git, instead of as the type of Bitbucket Cloud), the checkout fails: h3. Steps to Reproduce # Remove any native git capabilities from Bamboo so built-in JGit is used instead # Set up a plan with a linked repository to Bitbucket Cloud, using generic Git as the repository type instead of Bitbucket Cloud (so auth is performed over SSH) # Run the build h3. Expected Results The build checkout task should succeed h3. Actual Results The checkout fails with the following errors appearing in the logs: {code:title=atlassian-bamboo.log} java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. git@bitbucket.org:team/repository.git: channel is not opened. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:172) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:220) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:73) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:186) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. git@bitbucket.org:team/repository.git: channel is not opened. at com.atlassian.bamboo.plugins.git.JGitOperationHelper.fetch(JGitOperationHelper.java:345) at com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:383) at com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:378) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312) at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:377) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:252) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:56) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:177) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:173) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 15 more Caused by: com.atlassian.bamboo.repository.RepositoryException: PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. git@bitbucket.org:team/repository.git: channel is not opened. at com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:321) at com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:298) at com.atlassian.bamboo.plugins.git.JGitOperationHelper.withTransport(JGitOperationHelper.java:858) at com.atlassian.bamboo.plugins.git.JGitOperationHelper.fetch(JGitOperationHelper.java:297) ... 24 more Caused by: org.eclipse.jgit.errors.TransportException: git@bitbucket.org:team/repository.git: channel is not opened. at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:154) at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118) at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:130) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:116) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1096) at com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:315) ... 27 more Caused by: com.jcraft.jsch.JSchException: channel is not opened. at com.jcraft.jsch.Channel.connect(Channel.java:197) at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:150) ... 35 more {code} h3.Workaround * Install native git (which is the recommended git integration method anyway); or * Change repository type to Bitbucket Cloud so HTTPS authentication is used
    via by David Chevell,
  • Bug 184421 – random failures in JSch
    via by Unknown author,
  • channel is not opened
    via jsch by mohana23
    ,
  • Error When Starting Cluster
    via by Shaun Martinec,
  • Re: Error When Starting Cluster
    via by Tom White,
  • Re: Error When Starting Cluster
    via by Tom White,
    • java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. git@bitbucket.org:team/repository.git: channel is not opened. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:172) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:220) at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:73) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:186) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. git@bitbucket.org:team/repository.git: channel is not opened. at com.atlassian.bamboo.plugins.git.JGitOperationHelper.fetch(JGitOperationHelper.java:345) at com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:383) at com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:378) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312) at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:377) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:252) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:56) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:177) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:173) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 15 more Caused by: com.atlassian.bamboo.repository.RepositoryException: PROJ-PLAN-123: Cannot fetch branch 'refs/heads/master' from 'git@bitbucket.org:team/repository.git' to source directory '/var/application-data/atlassian/bamboo/bamboo-home/xml-data/build-dir/_git-repositories-cache/b819c2eb9f63c320d4133bd1309e21062cef8d78'. git@bitbucket.org:team/repository.git: channel is not opened. at com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:321) at com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:298) at com.atlassian.bamboo.plugins.git.JGitOperationHelper.withTransport(JGitOperationHelper.java:858) at com.atlassian.bamboo.plugins.git.JGitOperationHelper.fetch(JGitOperationHelper.java:297) ... 24 more Caused by: org.eclipse.jgit.errors.TransportException: git@bitbucket.org:team/repository.git: channel is not opened. at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:154) at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118) at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:130) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:116) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1096) at com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:315) ... 27 more Caused by: com.jcraft.jsch.JSchException: channel is not opened. at com.jcraft.jsch.Channel.connect(Channel.java:197) at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:150) ... 35 more

    Users with the same issue

    Unknown visitor
    Unknown visitor5 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    14 more bugmates