1)安装Environment Injector插件
2)jenkins新建item选择自由风格项目
3)选择Prepare an environment for the run
4)勾选 Keep Jenkins Environment Variables 和 Keep Jenkins Build Variables
5)script Content框内加入: git config --global core.longpaths true
6)重启jenkins,问题解决。

1)安装Environment Injector插件
2)jenkins新建item选择自由风格项目
3)选择Prepare an environment for the run
4)勾选 Keep Jenkins Environment Variables 和 Keep Jenkins Build Variables
5)script Content框内加入: git config --global core.longpaths true
6)重启jenkins,问题解决。