git - Git 签出到 Jenkins 中的子目录失败
问题描述
为我们的 Golang 项目开发 CI。
在 Windows master 上安装 Jenkins 后,我配置了第一个 Freestyle 项目。为了构建 golang 项目,项目代码必须在 GOPATH 下src
。这是在我的情况里面C:\Windows\System32\config\systemprofile\go\
。
Source code management
我对Jenkins内部的 Git Repository 选项进行了一些修改。我设置Check out to sub-directory
为C:\Windows\System32\config\systemprofile\go\src\nhm
所以 go 项目会被拉到 GOPATH 中。在我这样做之后,该git-fetch
步骤开始失败。
错误是:
ERROR: Error cloning remote repo 'origin'
stderr: error: cannot spawn C:\Windows\System32\config\systemprofile\go\src\nhm@tmp\ssh3120648910683130753.bat: No such file or directory
Jenkins 目录没有改变(这包括 workspaceDir${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}
和 buildsDir ${ITEM_ROOTDIR}/builds
)
我在这里想念什么?什么时候生成这个 .bat 文件,以便以后可以使用它来进行 git-clone?
解决方案
推荐阅读
- javascript - 我如何在本地存储中存入一笔款项?
- python - 将 numpy 数组的所有元素设置为零与创建一个新的零数组
- flask - Flask - Request.form.get data from element in for loop
- python - 由于 numpy.core._exceptions._ArrayMemoryError 使用 pandas compare(),如何在 Lambda 中释放内存
- asp.net-core - 表示层和应用层的DTO定义
- java - 使用 java 通过课堂 api 向课程播报文本
- jquery - 带有条件的jquery表排序器
- javascript - 在 HTML localStorage 中存储类名
- linux - 如何更改 docker 用于构建映像的默认目录
- c - 不会在命令上终止的简单循环程序