Agent git checkout stuck at lfs credential batch file not found
I am using a http lfs storage that not official supported by TeamCity(it needs https). I try to solve this by “git-lfs install --system”, but currently lfs still stuck at lfs credrential checking phase.
As we can see in the log, at the end it is stuck at failing to find a credential batch file. If I don't mannually stop the build it will stuck forever even if teamcity.git.idle.timeout.seconds is set to 180.
Limitation is that I have to use http connection to the lfs server (lfs server uses Nexus Repository Manager which is not under the control by my project team but another project team in same company, and it can't be transfered from http and https in short time).
I wonder if there's way to make lfs work? Currently I have to go to build machine to checkout branch and pull/reset to commit that I want to build before I trigger build on TeamCity website. Otherwise if there is new commit to this branch or another branch, it will stuck.
My checkout policy is checkout on agent with custom path leads to unity project path and set agent never use clean checkout by Getting Teamcity to use existing git repository – TeamCity Support | JetBrains.
12:03:38 Checkout directory: D:\GameEngine\UnityProjects\Test
12:03:38 Updating sources: agent side checkout
12:03:38 VCS Root: http://<repo ip:port>/MCC/mcc-unity-ry.git#refs/heads/main
12:03:38 revision: 206fdfad5c47e753d451f5f8f7963668147b5ca7
12:03:38 Git version: 2.45.2.0
12:03:38 Update checkout directory (D:\GameEngine\UnityProjects\Test)
12:03:38 D:\ProgramDesign\VCS\Git\cmd\git.exe rev-parse --is-shallow-repository
12:03:38 fatal: detected dubious ownership in repository at 'D:/GameEngine/UnityProjects/Test/.git'
12:03:38 'D:/GameEngine/UnityProjects/Test/.git' is owned by:
12:03:38 XXXXXXX/Administrator
12:03:38 but the current user is:
12:03:38 NT AUTHORITY/SYSTEM
12:03:38 To add an exception for this directory, call:
12:03:38
12:03:38 git config --global --add safe.directory D:/GameEngine/UnityProjects/Test/.git
12:03:38 D:\ProgramDesign\VCS\Git\cmd\git.exe config core.sparseCheckout true
12:03:38 fatal: not in a git directory
12:03:38 Cleaning D:\GameEngine\UnityProjects\Test
12:04:32 The .git directory is missing in 'D:\GameEngine\UnityProjects\Test'. Running 'git init'...
12:04:32 D:\ProgramDesign\VCS\Git\cmd\git.exe init --initial-branch=main
12:04:32 D:\ProgramDesign\VCS\Git\cmd\git.exe config core.sparseCheckout true
12:04:32 D:\ProgramDesign\VCS\Git\cmd\git.exe config http.sslCAInfo
12:04:32 D:\ProgramDesign\VCS\Git\cmd\git.exe config --unset http.sslCAInfo
12:04:33 D:\ProgramDesign\VCS\Git\cmd\git.exe show-ref
12:04:33 Local clone state requires 'git fetch'.
12:04:33 D:\ProgramDesign\VCS\Git\cmd\git.exe -c core.askpass=D:\ProgramDesign\JetBrains\TeamCity\buildAgent\temp\buildTmp\pass760727985837645970.bat -c credential.helper= -c credential.helper=D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred12300374609084212908.bat fetch --progress --recurse-submodules=no origin +refs/heads/dev-perf:refs/remotes/origin/dev-perf
12:04:58 D:\ProgramDesign\VCS\Git\cmd\git.exe log -n1 --pretty=format:%H%x20%s 206fdfad5c47e753d451f5f8f7963668147b5ca7 --
12:04:58 D:\ProgramDesign\VCS\Git\cmd\git.exe branch
12:04:58 D:\ProgramDesign\VCS\Git\cmd\git.exe branch --create-reflog --track dev-perf refs/remotes/origin/dev-perf
12:04:58 D:\ProgramDesign\VCS\Git\cmd\git.exe update-ref refs/heads/dev-perf 206fdfad5c47e753d451f5f8f7963668147b5ca7
12:04:58 D:\ProgramDesign\VCS\Git\cmd\git.exe -c core.askpass=D:\ProgramDesign\JetBrains\TeamCity\buildAgent\temp\buildTmp\pass5195492005804513410.bat -c credential.helper= -c credential.helper=D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat checkout -q -f dev-perf
12:05:00 The batch file cannot be found.
12:05:00 D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat get: line 1: D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat: No such file or directory
12:05:00 D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat erase: line 1: D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat: No such file or directory
12:05:00 D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat get: line 1: D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat: No such file or directory
12:05:00 D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat erase: line 1: D:/ProgramDesign/JetBrains/TeamCity/buildAgent/temp/buildTmp/cred13787553445705001821.bat: No such file or directory
Please sign in to leave a comment.