无法在代理上执行检出:java.io.IOException:访问被拒绝-TeamCity

问题描述 投票:0回答:1

[我们在尝试对其中一个teamcity代理进行结帐时收到“访问被拒绝”错误。另一个代理能够签出并构建良好。

我添加了此属性teamcity.git.use.native.ssh = true,并检查teamcity用户是否具有与其他代理相同的权限,并尝试删除system \ git *下的.git文件。这些都不起作用。

附加日志文件和屏幕截图。

enter image description here

日志文件

[09:17:25] : Collecting changes in 1 VCS root
[09:17:25] :     [Collecting changes in 1 VCS root] VCS Root details
[09:17:25] :         [VCS Root details] "Generic Git VCS Root" {instance id=512, parent internal id=44, parent id=GenericGitVcsRoot, description: "http://*****/tfs/SMI-RPS/RPSMain/_git/cmp#refs/heads/master"}
[09:17:26]i:     [Collecting changes in 1 VCS root] Detecting changes in VCS root 'Generic Git VCS Root' (used in 'Development Insights', 'Publish Package To Octopus')
[09:17:26]i:     [Collecting changes in 1 VCS root] Will collect changes for 'Generic Git VCS Root' starting from revision cfd2c37103f4c71213bf9ffd2700381ac67e038f
[09:17:26] :     [Collecting changes in 1 VCS root] Compute revision for 'Generic Git VCS Root'
[09:17:26] :         [Compute revision for 'Generic Git VCS Root'] Upper limit revision: cfd2c37103f4c71213bf9ffd2700381ac67e038f
[09:17:26]i:         [Compute revision for 'Generic Git VCS Root'] MaxModId = 22287
[09:17:26] :         [Compute revision for 'Generic Git VCS Root'] Latest commit attached to build configuration (with id <= 22287): cfd2c37103f4c71213bf9ffd2700381ac67e038f
[09:17:26] :         [Compute revision for 'Generic Git VCS Root'] Computed revision: cfd2c37103f4c71213bf9ffd2700381ac67e038f
[09:17:26] : The build is removed from the queue to be prepared for the start
[09:17:26] : Starting the build on the agent "****"
[09:17:27]i: Agent time zone: America/***
[09:17:19]i: Agent is running under JRE: 1.8.0_121-b13
[09:17:19] : Updating tools for build
[09:17:19] :     [Updating tools for build] Found 1 tool used by the build: NuGet.CommandLine.3.4.4
[09:17:19] :     [Updating tools for build] All used tools are up-to-date
[09:17:19] : Clearing temporary directory: D:\TeamCity\buildAgent\temp\buildTmp
[09:17:19] : Publishing internal artifacts (4s)
[09:17:24] :     [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:17:24] :     [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[09:17:19] : Clean build enabled: removing old files from D:\TeamCity\buildAgent\work\3b5eca5f1ef307d3
[09:17:19] : Checkout directory: D:\TeamCity\buildAgent\work\3b5eca5f1ef307d3
[09:17:19]E: Updating sources: auto checkout (on agent) (1m:01s)
[09:17:19] :     [Updating sources] Will use agent side checkout
[09:17:19]W:     [Updating sources] VCS Root: Generic Git VCS Root (1m:01s)
[09:17:19] :         [VCS Root: Generic Git VCS Root] revision: cfd2c37103f4c71213bf9ffd2700381ac67e038f
[09:17:19] :         [VCS Root: Generic Git VCS Root] Git version: 2.15.0.0
[09:17:19] :         [VCS Root: Generic Git VCS Root] Will use native ssh (teamcity.git.use.native.ssh=true)
[09:17:19]W:         [VCS Root: Generic Git VCS Root] Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git) (1m:01s)
[09:17:19] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" config http.sslCAInfo
[09:17:19] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" config --unset http.sslCAInfo
[09:17:19] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" show-ref
[09:17:20]W:             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] Failed to list remote repository refs, outdated local refs will not be cleaned
[09:17:20] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" show-ref refs/remotes/origin/master
[09:17:20] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" show-ref refs/heads/master
[09:18:20] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" init --bare
[09:18:20] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" config http.sslCAInfo
[09:18:20] :             [Update git mirror (D:\TeamCity\buildAgent\system\git\git-299ED72F.git)] "C:\Program Files\Git\bin\git.exe" config --unset http.sslCAInfo
[09:18:20]E:     [Updating sources] Failed to perform checkout on agent: java.io.IOException: Access is denied
[09:18:20] : Publishing internal artifacts
[09:18:20] :     [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:18:21] :     [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[09:18:20] : Build failed to start. Artifacts will not be published for this build
[09:18:30] : Build finished ```




teamcity
1个回答
0
投票

可能有很多导致此错误的原因。一些想法:

  • TeamCity代理服务是否在两个代理上以同一用户身份运行?
  • 两个代理上的文件夹权限是否相同?
  • 如果您使用服务器端结帐而不是代理端结帐,结帐工作吗?
  • 是否可能有人在代理上打开文件/文件夹导致文件锁定?
© www.soinside.com 2019 - 2024. All rights reserved.