1
votes

Failed to perform checkout on agent: '"C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass8517307457314531623.bat -c credential.helper= -c credential.helper=C:/TeamCity/buildAgent/temp/buildTmp/credHelper4649196994804332385.bat reset --hard 1df124bae56fa97bbfd0c144a85fa80cacd4fedb' command failed.

Please note, I have tried adding teamcity.git.use.native.ssh=true in C:\TeamCity\buildAgent\conf\buildAgent.properties file at the end of file. Also tried adding it in "Configuration Parameters" but no avail. Any guidance will be appreciated.

UPDATE: Build Log

Build 'BUILD_NAME :: Build' #10 Started 2017-09-06 04:17:09 on 'AGENT_NAME' by 'Git' Finished 2017-09-06 04:17:24 with status FAILURE 'Error while applying patch' VCS revisions: 'https://[email protected]/PROJECT.git#refs/heads/deploy' (Git): 6d6ef41657179c8e25b128c479d570b0320e368f (branch 'refs/heads/deploy') TeamCity URL http://SERVER:PORT/viewLog.html?buildId=258&buildTypeId=BUILD_NAME_Build TeamCity server version is 2017.1 (build 46533), timezone: UTC

[04:17:03]E: bt9 (20s) [04:17:03]i: TeamCity server version is 2017.1 (build 46533) [04:17:03] : Finalize build settings [04:17:04] : The build is removed from the queue to be prepared for the start [04:17:04] : Collecting changes in 1 VCS root (4s) [04:17:04] :
[Collecting changes in 1 VCS root] VCS Root details [04:17:04] :
[VCS Root details] "https://[email protected]/PROJECT.git#refs/heads/deploy" {instance id=27, parent internal id=9, parent id=BUILD_NAME_HttpsUSERNAMEBitbucketOrgPROJECTGitRefs, description: "https://[email protected]/PROJECT.git#refs/heads/deploy"} [04:17:08]i: [Collecting changes in 1 VCS root] Detecting changes in VCS root 'https://[email protected]/PROJECT.git#refs/heads/deploy' (used in 'Build') [04:17:08]i: [Collecting changes in 1 VCS root] Will collect changes for 'https://[email protected]/PROJECT.git#refs/heads/deploy' starting from revision 6d6ef41657179c8e25b128c479d570b0320e368f [04:17:08] : [Collecting changes in 1 VCS root] Compute revision for 'https://[email protected]/PROJECT.git#refs/heads/deploy' [04:17:08] : [Compute revision for 'https://[email protected]/PROJECT.git#refs/heads/deploy'] Upper limit revision: 6d6ef41657179c8e25b128c479d570b0320e368f [04:17:08]i: [Compute revision for 'https://[email protected]/PROJECT.git#refs/heads/deploy'] MaxModId = 6006 [04:17:08] : [Compute revision for 'https://[email protected]/PROJECT.git#refs/heads/deploy'] Latest commit attached to build configuration: 6d6ef41657179c8e25b128c479d570b0320e368f [04:17:08] : [Compute revision for 'https://[email protected]/PROJECT.git#refs/heads/deploy'] Computed revision: 6d6ef41657179c8e25b128c479d570b0320e368f [04:17:08] : Starting the build on the agent AGENT_NAME [04:17:09]i: Agent time zone: UTC [04:17:10]i: Agent is running under JRE: 1.8.0_121-b13 [04:17:10] : Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp [04:17:10] : Publishing internal artifacts [04:17:10] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher] [04:17:10] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher] [04:17:10] : Using vcs information from agent file: 40fe536e1ba26e7d.xml [04:17:10] : Checkout directory: C:\TeamCity\buildAgent\work\40fe536e1ba26e7d [04:17:10]E: Updating sources: auto checkout (on agent) (13s) [04:17:10] : [Updating sources] Will use agent side checkout [04:17:10] : [Updating sources] VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy (13s) [04:17:10] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] revision: 6d6ef41657179c8e25b128c479d570b0320e368f [04:17:10] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] Git version: 2.13.0.0 [04:17:10] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" show-ref [04:17:10] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass6391275250942021006.bat -c credential.helper= ls-remote origin [04:17:11] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" show-ref refs/remotes/origin/deploy [04:17:11] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" show-ref refs/heads/deploy [04:17:11] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4132618148202213556.bat -c credential.helper= fetch --progress origin +refs/heads/deploy:refs/heads/deploy (2s) [04:17:13] : [[C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4132618148202213556.bat -c credential.helper= fetch --progress origin +refs/heads/deploy:refs/heads/deploy] remote: Counting objects: 1, done. [04:17:13] :
[[C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4132618148202213556.bat -c credential.helper= fetch --progress origin +refs/heads/deploy:refs/heads/deploy] remote: Total 1 (delta 0), reused 0 (delta 0) [04:17:13] :
[[C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4132618148202213556.bat -c credential.helper= fetch --progress origin +refs/heads/deploy:refs/heads/deploy] From https://bitbucket.org/PROJECT [04:17:13] :
[[C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4132618148202213556.bat -c credential.helper= fetch --progress origin +refs/heads/deploy:refs/heads/deploy] * [new branch] deploy -> deploy [04:17:13] : [[C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4132618148202213556.bat -c credential.helper= fetch --progress origin +refs/heads/deploy:refs/heads/deploy] * [new branch] deploy -> origin/deploy [04:17:13] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" log -n1 --pretty=format:%H%x20%s 6d6ef41657179c8e25b128c479d570b0320e368f -- [04:17:13] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" config remote.origin.url [04:17:13] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\system\git\git-775EA635.git]: "C:\Program Files\Git\bin\git.exe" pack-refs --all [04:17:13] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" config core.sparseCheckout true [04:17:13] :
[VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" show-ref [04:17:13] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass8692935477830272422.bat -c credential.helper= ls-remote origin [04:17:14] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" show-ref refs/remotes/origin/deploy [04:17:14] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" log -n1 --pretty=format:%H%x20%s 6d6ef41657179c8e25b128c479d570b0320e368f -- [04:17:14] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" branch [04:17:14] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" update-ref refs/heads/deploy 6d6ef41657179c8e25b128c479d570b0320e368f [04:17:14] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] [C:\TeamCity\buildAgent\work\40fe536e1ba26e7d]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass3509070227318612601.bat -c credential.helper= -c credential.helper=C:/TeamCity/buildAgent/temp/buildTmp/credHelper7927651800956395094.bat checkout -q -f deploy [04:17:24] : [VCS Root: https://[email protected]/PROJECT.git#refs/heads/deploy] fatal: cannot create directory at 'node_modules/ep_etherpad-lite/node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan': Filename too long [04:17:24]E: [Updating sources] Failed to perform checkout on agent: '"C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass3509070227318612601.bat -c credential.helper= -c credential.helper=C:/TeamCity/buildAgent/temp/buildTmp/credHelper7927651800956395094.bat checkout -q -f deploy' command failed. exit code: 128 stderr: fatal: cannot create directory at 'node_modules/ep_etherpad-lite/node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan': Filename too long [04:17:24] : Publishing internal artifacts [04:17:24] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher] [04:17:24] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher] [04:17:24] : Build failed to start. Artifacts will not be published for this build [04:17:25] : Build finished

2
Can you provide more details? What is the TeamCity version? How your VCS root is configured? Can you show the whole log?Boris Modylevsky
Hi Boris, added build log. TeamCity Version is "TeamCity Professional 2017.1"Blue

2 Answers

0
votes

From the log I see that the problem is with creating too long path. On Windows maximum path length is 260 characters. I suggest reducing the nesting of directories in your project structure:

node_modules/ep_etherpad-lite/node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan

0
votes

Filename too long was indeed the problem but being an etherpad project I was not in position to change the plugin name or path so I change my workDir to be smallest possible in C:\TeamCity\buildAgent\conf\buildAgent.properties i.e. workDir=C\:\\w and it worked for me.