VCS Failed to collect changes, error: List remote refs failed: org.eclipse.jgit.errors.TransportException

Answered

Hi,

This is suddenly happening to all our automated builds that use a dedicated DevOps user, but even using a different user that we are able to use from our dev boxes without problems, this error persists!

 


Failed for the root '"XXXdevelop branch" {instance id=131, parent internal id=15, parent id=XXX_DevelopBranch, description: "https://bitbucket.org/XXX/XXXgit#refs/heads/develop"}: List remote refs failed: org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
Hide stacktrace
jetbrains.buildServer.vcs.VcsRootVcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.createRootException(VcsChangesStatesCollector.java:111)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:50)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:20)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:35)
at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:1)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:10)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.getStateAndCreateChangesCollectingTasks(VcsChangesFetcher.java:6)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:78)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:93)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:4)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:6)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:185)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:508)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$getCurrentState$0(GitVcsSupport.java:182)
at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:178)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:173)
at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.getCurrentState(GitCollectChangesPolicy.java:113)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:2)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$null$0(VcsRootInstanceImpl.java:31)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:2)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:21)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyNetworkOperation(ReadOnlyRestrictor.java:4)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$1(VcsRootInstanceImpl.java:143)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:2)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafeCommandLine(SecondaryNodeSecurityManager.java:17)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyCommandLine(ReadOnlyRestrictor.java:3)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:129)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:1)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:4)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:93)
... 18 more
Caused by: org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:575)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:389)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:526)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:503)
... 37 more
jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:185)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:508)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$getCurrentState$0(GitVcsSupport.java:182)
at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:178)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:173)
at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.getCurrentState(GitCollectChangesPolicy.java:113)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:2)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$null$0(VcsRootInstanceImpl.java:31)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:2)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:21)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyNetworkOperation(ReadOnlyRestrictor.java:4)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$1(VcsRootInstanceImpl.java:143)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:2)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafeCommandLine(SecondaryNodeSecurityManager.java:17)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyCommandLine(ReadOnlyRestrictor.java:3)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:129)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:1)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:4)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:93)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:20)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:35)
at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:1)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:10)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.getStateAndCreateChangesCollectingTasks(VcsChangesFetcher.java:6)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:78)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:93)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:4)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:6)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:575)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:389)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:526)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:503)
... 37 more
org.eclipse.jgit.errors.TransportException: https://bitbucket.org/XXX/XXX.git: git-upload-pack not permitted on 'https://bitbucket.org/XXX/XXX.git/'
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:575)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:389)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:526)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:503)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$getCurrentState$0(GitVcsSupport.java:182)
at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:178)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:173)
at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.getCurrentState(GitCollectChangesPolicy.java:113)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:2)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$null$0(VcsRootInstanceImpl.java:31)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:2)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:21)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyNetworkOperation(ReadOnlyRestrictor.java:4)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$1(VcsRootInstanceImpl.java:143)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:2)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafeCommandLine(SecondaryNodeSecurityManager.java:17)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyCommandLine(ReadOnlyRestrictor.java:3)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:129)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:1)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:4)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:93)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:20)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:35)
at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:1)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:10)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.getStateAndCreateChangesCollectingTasks(VcsChangesFetcher.java:6)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:78)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:93)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:4)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:6)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

11 comments
Comment actions Permalink

things we have tried: 

using own credentials, changing the devops password, resetting the TC/BB connection, creating new VCS roots, updating existing roots, Using SSH vs HTTPS, using OAuth rather than password flow, resetting the DevOps permissions in BB

0
Comment actions Permalink

Hi Lee,

Could you please let me know which TeamCity version are you using?

Best regards,

Mikhail Efremov

0
Comment actions Permalink

Im now suddenly having the same errors, we're on 2020.1.4 (build 78906)

0
Comment actions Permalink

Chad, could you please upload an archive with teamcity-vcs.log and teamcity-server.log capturing the timeframe when the problem happened to https://uploads.jetbrains.com/?

0
Comment actions Permalink

IT's been uploaded.  It's been happening for a while but yesterday and this morning if have seen it bouncing from project to project. 

0
Comment actions Permalink

Chad, what is the upload ID? 

0
Comment actions Permalink

Sorry the upload id  is 2020_09_24_XLEcaGFespB7hcdQ 

0
Comment actions Permalink

@Chad, we have a discussion in TW-67603 about this problem. This seems to be a Bitbucket issue. Could you please try switching from HTTPS to SSH for bitbucket.org hosted repos and let me know if it helps?

0
Comment actions Permalink

I started having this same issue at the beginning of this week.  I thought maybe it was related to activating 2-step authorization on Atlassian but I removed it and still getting this same error.  I am running Team City version 2020.1 build 78475. I haven't set up keys to use SSH. Any ideas on this issue with https?  I even entered a bad password for authentication and I got the git-upload-pack error so it is occurring earlier than the authentication step.

0
Comment actions Permalink

Hi Larry,

This is probably related to the same TW-67603. Could you please upload an archive with teamcity-vcs.log and teamcity-server.log capturing the timeframe when the problem happened to https://uploads.jetbrains.com/? Please also add a screenshot of your VCS root settings into the archive.

0
Comment actions Permalink

Thanks Mikhail for your response. I have resolved the issue by creating an application password to my Atlassian Bitbucket account and added that to my build configuration to use for the VCS git pull of my repos for the builds.

0

Please sign in to leave a comment.