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.

Atlassian JIRA | David Chevell | 5 months ago
  1. 0

    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

    Atlassian JIRA | 5 months ago | David Chevell
    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.
  2. 0

    Replication: Slave out of sync apparently because "channel is not opened"

    Google Groups | 6 years ago | cbaldacin
    org.eclipse.jgit.errors.TransportException: gerrit2@cnbjlnx001:/srv/ gerrit2/git/platform/vendor/semc/packages/apps/metadata-cleanup.git: channel is not opened.
  3. 0

    Bug 184421 – random failures in JSch

    netbeans.org | 2 months ago
    com.jcraft.jsch.JSchException: channel is not opened.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    com.jcraft.jsch.JSchException: channel is not opened when opening a channel in jsch

    Stack Overflow | 1 year ago | K Erlandsson
    com.jcraft.jsch.JSchException: channel is not opened.
  6. 0

    Error copying gems during remote interpreter setup (vagrant)

    YouTrack | 3 years ago
    org.apache.commons.vfs2.FileSystemException: Could not copy "sftp://127.0.0.1:2222/usr/local/ruby/ruby-1.9.3-p448/lib/ruby/gems/1.9.1/gems/raindrops-0.12.0/.gitignore" to "file:///Users/steve/Library/Caches/RubyMine60/ruby_stubs/-828640210/983477008/gems/raindrops-0.12.0/.gitignore".

  1. Sachin Bhakare 1 times, last 8 months ago
20 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.jcraft.jsch.JSchException

    channel is not opened.

    at com.jcraft.jsch.Channel.connect()
  2. JSch
    Channel.connect
    1. com.jcraft.jsch.Channel.connect(Channel.java:197)
    1 frame
  3. JGit - Core
    Transport.fetch
    1. org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:150)
    2. org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118)
    3. org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91)
    4. org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
    5. org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
    6. org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:130)
    7. org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:116)
    8. org.eclipse.jgit.transport.Transport.fetch(Transport.java:1096)
    8 frames
  4. com.atlassian.bamboo
    GitRepository$3.call
    1. com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:315)
    2. com.atlassian.bamboo.plugins.git.JGitOperationHelper$3.doWithTransport(JGitOperationHelper.java:298)
    3. com.atlassian.bamboo.plugins.git.JGitOperationHelper.withTransport(JGitOperationHelper.java:858)
    4. com.atlassian.bamboo.plugins.git.JGitOperationHelper.fetch(JGitOperationHelper.java:297)
    5. com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:383)
    6. com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:378)
    6 frames
  5. com.atlassian.util
    ManagedLocks$ManagedLockImpl.withLock
    1. com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
    1 frame
  6. com.atlassian.bamboo
    ImpersonationHelper$1.run
    1. com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:377)
    2. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:252)
    3. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:56)
    4. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:177)
    5. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:173)
    6. com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
    7. com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
    8. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
    9. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
    10. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:172)
    11. com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:220)
    12. com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:73)
    13. com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74)
    14. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:186)
    15. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102)
    16. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108)
    17. com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
    18. com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
    19. com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
    20. com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
    20 frames
  7. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame