-->

Build Error while syncing the Git repo: Illegal ch

2019-08-10 09:59发布

问题:

Starting the build within TFS 2015 Web-Access shows the log, it tries to retrieve the current sources from the git-repo: (it´s the German output, that I tried to translate...)

******************************************************************************
Started: Pull the sources
******************************************************************************
Syncing repository: MyRepoName (Git)
845042f7a1d5f22b55fa41c7fe9c888337358d08 to C:\tfsbuildagent\_work\c492b04c\MyRepoName checking out
Checked out branch refs/heads/MyBranchName for repository MyRepoName at commit 845042f7a1d5f22b55fa41c7fe9c888337358d08

Illegal characters in path.
The worker Worker-afa1a91e-6364-49ab-afa2-1a5ebd33682a has finished execution of the task afa1a91e-6364-49ab-afa2-1a5ebd33682a.

******************************************************************************
Build finished
******************************************************************************

I have already tried to delete the work-folder on the build-slave completely to force a clean checkout again - then as expected the checkout took some more time but afterwards it resulted in the same error. I have no idea WHICH path is meant and WHAT illegal characters might be in it.

Yesterday in the morning the build worked still well (as many times before), then I committed some minor code changes, solved merge conflicts, pushed again, and I changed the build definition a bit, that´s all... ;-(

回答1:

When I received that error message, it was because the system was unable to delete the file because it was in use, but it could also be an Access Denied error. The product team has made a fix so the real error message shows up and not this one. It should roll out with the S92 deployment (happens between now and the next 2 weeks)



回答2:

I have tried a vNext build by add "Visual Studio Build" step to build a project under Git team project, the log looks like:

******************************************************************************
Starting: Get sources
******************************************************************************
Syncing repository: GitXa (Git)
Checking out ea7fa9989e7af544c4896ad62cbbc5210a2cc96c to E:\1116\agent\_work\1\s
Checked out branch refs/heads/master for repository GitXa at commit ea7fa9989e7af544c4896ad62cbbc5210a2cc96c
******************************************************************************
Running tasks 

Your log "845042f7a1d5f22b55fa41c7fe9c888337358d08 to C:\tfsbuildagent\_work\c492b04c\MyRepoName checking out" is not a correct path.