Error while checkout from GitHub

Completed

I create Project From GitHub repository and try to build it.
But I get 'error while applying patch':

Started 'Fri Aug 19 18:37:30 MSK 2016' on 'Builder-????' by 'builder'
Finished 'Fri Aug 19 20:50:25 MSK 2016' with status 'FAILURE Error while applying patch'
TeamCity URL http://localhost/viewLog.html?buildId=33&buildTypeId=Quants_Build
TeamCity server version is 10.0.1 (build 42078)

[18:36:33]E: bt6 (2h:13m:51s)
[18:36:33]i: TeamCity server version is 10.0.1 (build 42078)
[18:36:33] : Finalize build settings (15s)
[18:36:34] : [Finalize build settings] Save current settings (14s)
[18:36:59] : Collecting changes in 1 VCS root (4s)
[18:36:59] : [Collecting changes in 1 VCS root] VCS Root details
[18:36:59] : [VCS Root details] "https://github.com/<...>#refs/heads/master" {instance id=22, parent internal id=6, parent id=HttpsGithubCom<...>RefsHeadsMaster, description: "https://github.com/<...>#refs/heads/master"}
[18:37:03]i: [Collecting changes in 1 VCS root] Waiting for completion of current operations for the VCS root 'https://github.com/<...>#refs/heads/master'
[18:37:03]i: [Collecting changes in 1 VCS root] Detecting changes in VCS root 'https://github.com/<...>#refs/heads/master' (used in 'Build')
[18:37:03]i: [Collecting changes in 1 VCS root] Will collect changes for 'https://github.com/<...>#refs/heads/master' starting from revision 520d88709536e3313ad827ba97f537256af4fd6e
[18:37:04] : [Collecting changes in 1 VCS root] Compute revision for 'https://github.com/<...>#refs/heads/master'
[18:37:04] : [Compute revision for 'https://github.com/<...>#refs/heads/master'] Upper limit revision: 520d88709536e3313ad827ba97f537256af4fd6e
[18:37:04] : [Compute revision for 'https://github.com/<...>#refs/heads/master'] No modification from VCS root is attached to build configuration, use upper limit revision
[18:37:04] : [Compute revision for 'https://github.com/<...>#refs/heads/master'] Computed revision: 520d88709536e3313ad827ba97f537256af4fd6e
[18:37:05]i: Waiting for the agent to start the build
[18:37:30]i: Agent time zone: Europe/Moscow
[18:38:06]i: Agent is running under JRE: 1.8.0_66-b17
[18:38:25] : Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[18:38:26] : Publishing internal artifacts (6s)
[18:38:28] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[18:38:28] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[18:38:27] : Checkout directory: C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0
[18:38:27]E: Updating sources: auto checkout (on agent) (2h:11m:51s)
[18:38:27] : [Updating sources] Will use agent side checkout
[18:38:27] : [Updating sources] Using vcs information from agent file: f9e3a82e0b371eb0.xml
[18:38:37]W: [Updating sources] VCS Root: https://github.com/<...>#refs/heads/master (2h:11m:41s)
[18:38:37] : [VCS Root: https://github.com/<...>#refs/heads/master] revision: 520d88709536e3313ad827ba97f537256af4fd6e
[18:38:43] : [VCS Root: https://github.com/<...>#refs/heads/master] Git version: 2.9.2.0
[18:38:43] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\system\git\git-6C3E3E0D.git]: "C:\Program Files\Git\bin\git.exe" show-ref
[18:38:45] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\system\git\git-6C3E3E0D.git]: "C:\Program Files\Git\bin\git.exe" -c credential.helper=C:\TeamCity\buildAgent\temp\buildTmp\credHelper6601854028552431887.bat -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass4586023754066982326.bat ls-remote origin
[19:43:26]W: [VCS Root: https://github.com/<...>#refs/heads/master] Failed to list remote repository refs, outdated local refs will not be cleaned
[19:43:26] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\system\git\git-6C3E3E0D.git]: "C:\Program Files\Git\bin\git.exe" show-ref refs/heads/master
[19:43:26] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\system\git\git-6C3E3E0D.git]: "C:\Program Files\Git\bin\git.exe" show-ref refs/heads/master
[19:43:26] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" config remote.origin.url
[19:43:26] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\system\git\git-6C3E3E0D.git]: "C:\Program Files\Git\bin\git.exe" pack-refs --all
[19:43:27] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" config core.sparseCheckout true
[19:43:27] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" show-ref
[19:43:27] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" -c credential.helper=C:\TeamCity\buildAgent\temp\buildTmp\credHelper5407453476373536276.bat -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass6440240622073829830.bat ls-remote origin
[20:49:39]W: [VCS Root: https://github.com/<...>#refs/heads/master] Failed to list remote repository refs, outdated local refs will not be cleaned
[20:49:39] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" show-ref refs/remotes/origin/master
[20:49:40] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" log -n1 --pretty=format:%H%x20%s 520d88709536e3313ad827ba97f537256af4fd6e --
[20:49:42] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" branch
[20:49:42] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass2130956421667571877.bat -c credential.helper=C:\TeamCity\buildAgent\temp\buildTmp\credHelper8958594240940416998.bat reset --hard 520d88709536e3313ad827ba97f537256af4fd6e
[20:50:01] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" branch --set-upstream-to=refs/remotes/origin/master
[20:50:01] : [VCS Root: https://github.com/<...>#refs/heads/master] Checkout submodules in C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0
[20:50:01] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" submodule init
[20:50:08] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" submodule sync
[20:50:15] : [VCS Root: https://github.com/<...>#refs/heads/master] [C:\TeamCity\buildAgent\work\f9e3a82e0b371eb0]: "C:\Program Files\Git\bin\git.exe" -c credential.helper=C:\TeamCity\buildAgent\temp\buildTmp\credHelper3296356254973425897.bat -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass3968965024016884799.bat submodule update --force
[20:50:18] : [VCS Root: https://github.com/<...>#refs/heads/master] fatal: Needed a single revision
[20:50:18] : [VCS Root: https://github.com/<...>#refs/heads/master] Unable to find current revision in submodule path 'internal'
[20:50:19]E: [Updating sources] Failed to perform checkout on agent: '"C:\Program Files\Git\bin\git.exe" -c credential.helper=C:\TeamCity\buildAgent\temp\buildTmp\credHelper3296356254973425897.bat -c core.askpass=C:\TeamCity\buildAgent\temp\buildTmp\pass3968965024016884799.bat submodule update --force' command failed.
exit code: 1
stderr: fatal: Needed a single revision
Unable to find current revision in submodule path 'internal'
[20:50:23] : Publishing internal artifacts
[20:50:23] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[20:50:23] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[20:50:23] : Build failed to start. Artifacts will not be published for this build
[20:50:28] : Build finished

The same repository successfully work on the same host through Visual Studio or GitHub Desktop.

Another repository successfully checkout and build on the same TeamCity agent.

Can you please suggest, what could be the problem?

3 comments

I have the same problem, can someone assist??

0

Hello,

Could you please attach screenshot of the VCS root settings, full build log and teamcity-vcs.log file from agent machine if agent-side checkout is used? Also please try to run clean checkout. Does it help?

0

I fixed the problem by using ssh to checkout on the agent side.

0

Please sign in to leave a comment.