jenkins扫描多分支流水线宝座FATAL: Failed to recompute children of test-multi hudson.plugins.git.GitException: Command "git ls-remote --symref -- ssh://git@10.32.1.138:9922/hj/test-multi.git" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository.
时间: 2024-02-16 22:05:31 浏览: 45
这个错误一般是由于没有设置正确的 SSH 密钥或者是没有添加正确的 Host Key 导致的。你可以尝试以下步骤来解决这个问题:
1. 确认是否正确配置了 SSH 密钥,可以通过在终端中执行 `ssh -T git@10.32.1.138 -p 9922` 来测试是否可以连接到 Git 服务器。
2. 如果 SSH 密钥正确配置,那么可能是 Host Key 没有正确添加。你可以通过在终端中执行以下命令来添加 Host Key:
```
ssh-keyscan -p 9922 10.32.1.138 >> ~/.ssh/known_hosts
```
注意:这个命令会将 Host Key 添加到当前用户的 `~/.ssh/known_hosts` 文件中,如果你使用的是其他用户,需要将 `~/.ssh/known_hosts` 替换成相应用户的文件路径。
3. 如果以上步骤都无法解决问题,可能是 Git 服务器端的配置问题,需要联系 Git 服务器管理员进行排查。
相关问题
jenkins failed to execute goal org.apache.maven.plugins:maven-compiler-plugi
Jenkins是一个流行的开源自动化服务器,它通常用于构建、测试和部署软件。在使用Jenkins构建Maven项目时,可能会遇到“Jenkins failed to execute goal org.apache.maven.plugins:maven-compiler-plugin”的错误。
这个错误通常表示Maven编译器插件(maven-compiler-plugin)在执行过程中出现了问题。这可能是由于配置错误、依赖关系问题或版本不兼容性问题等原因引起的。
要解决这个问题,我们可以首先检查Jenkins和Maven的版本是否兼容。如果版本兼容性存在问题,我们可能需要升级或降级其中一个工具。
如果版本兼容性不是问题,我们需要检查配置文件(如pom.xml)是否正确,特别是与编译器插件相关的部分。也可以尝试删除本地Maven存储库中的缓存,然后重新编译项目。
最后,在Jenkins中添加详细的日志记录和调试信息可能也有助于快速定位问题并解决它。
Fetching upstream changes from git@github. com:a792883583/treeHoleScore.git > /usr/bin/git --version # timeout=10 > git --version # 'git version 1.8.3.1' using GIT _ASKPASS to set credentials github > /usr/bin/git fetch --tags --progress git@github. com:a792883583/treeHoleScore.git +refs/heads/*:refs/remotes/origin/* # timeout=10 ERROR: Error fetching remote repo 'origin' hudson. plugins.git.GitException: Failed to fetch from git@github. com:a792883583/treeHoleScore.git at hudson. plugins . git .GitSCM. fetchFrom(GitSCM. java:1003) at hudson. plugins .git .GitSCM. retrieveChanges(GitSCM. java:1245) at hudson.plugins.git.GitsCM. checkout(GitSCM. java:1309) at hudson.scm. SCM. checkout(SCM. java:540) at hudson. mode1. AbstractProject . checkout(AbstractProject . java:1240) at hudson. model AbstractBuild$AbstractBuildExecution. def aultCheckout (AbstractBuild. java:649) at jenkins .scm. SCMCheckoutStrategy . checkout(SCMCheckoutStrategy . java:85) at hudson . model. AbstractBuild$AbstractBuildExecution. run(AbstractBuild. java:521) at hudson.model . Run. execute(Run. java:1900) at hudson.model. FreeSty1eBuild.run(FreeStyleBuild.java:44) at hudson. model. ResourceController . execute(ResourceController . java:101) at hudson. model. Executor .run(Executor. java:442) Caused by: hudson. plugins.git .GitException: Command "/usr/bin/git fetch --tags --progress git@github . com: a792883583/treeHoleScore.git +refs/heads/* :refs/remotes/origin/*" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci .plugins.gitclient .CliGitAPIImp1.1aunchCommandIn(CliGitAPImp1.java:2734) at org.jenkinsci .plugins.gitclient .CliGitAPIImp1.1aunchCommandWithCredentials(CliGitAPIImpl.java:2111) at org.jenkinsci.plugins . gitclient .CliGitAPIImp1$1. execute(CliGitAPIImp1.java:623) at hudson.p1ugins . git .GitSCM. fetchFrom (GitSCM. java:1001) 11 more ERROR: Error fetching remote repo ' origin' Finished: FAILURE
"Fetching upstream changes from git@github.com:a792883583/treeHoleScore.git" 意思是从 "git@github.com:a792883583/treeHoleScore.git" 这个地址获取最新的更改。
"/usr/bin/git --version" 意思是在本地执行 "git" 命令,并使用 "--version" 选项来查看当前 Git 版本。
相关推荐
![html](https://img-home.csdnimg.cn/images/20210720083451.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)