程序员熊明才
2022-04-18 21:09
Started by user rootRunning as SYSTEM Building remotely on TestEnv in workspace /root/.jenkins/workspace/DeployOrder The recommended git tool is: NONE using credential 6d01249a-9773-4e97-b40b-5bab042e231c > /usr/local/bin/git rev-parse --resolve-git-dir /root/.jenkins/workspace/DeployOrder/order/.git # timeout=10 ERROR: Workspace has a .git repository, but it appears to be corrupt. hudson.plugins.git.GitException: Error performing git command: /usr/local/bin/git rev-parse --resolve-git-dir /root/.jenkins/workspace/DeployOrder/order/.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2679) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2601) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2597) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1968) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1980) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.hasGitRepo(CliGitAPIImpl.java:395) at hudson.plugins.git.GitAPI.hasGitRepo(GitAPI.java:241) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:924) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(Remo
我做了哪些排查
git 公钥和私钥配置是OK的
【我做了哪些尝试】
我按照这篇博客 https://www.cnblogs.com/panda-123/p/14456428.html 操作改成 main 不行
我按照 https://stackoverflow.com/questions/8639501/jenkins-could-not-run-git 这篇提问中解决办法尝试
这是我本地配置
这是我TestEnv 环境的
这是我本地Mac
解决方案:你需要配置Git在服务器上的运行地址
具体可参考https://blog.csdn.net/weixin_40816738/article/details/90280863
用Jenkins自动化搭建测试环境
37385 学习 · 236 问题
相似问题