Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
585 views
in Technique[技术] by (71.8m points)

Jenkins Windows 10: git-submodule cannot be used without a working tree

We have jenkins Windows 10 CI builder.

Our project has submodule, which I want to "git submodule update --init --recursive".

This command is called from cmake script, but even if one enables submodule processing the error will be the same: C:Program FilesGitmingw64/libexec/git-coregit-submodule cannot be used without a working tree. enter image description here

Current setup copies all files of project from Ubuntu jenkins is run on( the setup is not known for sure and I started studying Jenkins from bottom ) and puts them into Windows CI builder into Pull_Request_Builder_Winx64 folder.

Tried to run git manually from this folder: result is the same

Tried running update manually on the same project that is downloaded with git clone, it works.

Please help find the source of the issue, thanks in advance

question from:https://stackoverflow.com/questions/65882520/jenkins-windows-10-git-submodule-cannot-be-used-without-a-working-tree

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The issue was the symlink in the path to workspace( C:/jenkins/workspace, "workspace" is symlink here that points to R:/workspace )

Solution: Changed remote root directory in jenkins node configuration, so it contains no symlinks( new path: R:/jenkins, path to workspace will be R:/jenkins/workspace ) enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...