jenkins连接git仓库报错,这个该怎么解决

来源:13-5 实战交易系统:Jenkins构建自动化测试

花浅言

2022-10-06

图片描述
刚开始使用账号密码报错,后面使用了在百度上找的秘钥文件进行连接
刚开始没用https这个连接,但是使用那个git@github.com报错
图片描述
现在是连不上仓库
后面试运行的时候报错

Started by user root
Running as SYSTEM
Building in workspace C:\Users\DD\.jenkins\workspace\trading_system_autotest
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
The recommended git tool is: NONE
using credential 931b5dfb-ada5-4958-b192-6375651dfb72
Cloning the remote Git repository
Cloning repository https://github.com/gglss/jm_system_autotest.git
 > git.exe init C:\Users\DD\.jenkins\workspace\trading_system_autotest # timeout=10
Fetching upstream changes from https://github.com/gglss/jm_system_autotest.git
 > git.exe --version # timeout=10
 > git --version # 'git version 2.34.1.windows.1'
using GIT_SSH to set credentials 使用ssh
Verifying host key using known hosts file
You're using 'Known hosts file' strategy to verify ssh host keys, but your known_hosts file does not exist, please go to 'Manage Jenkins' -> 'Configure Global Security' -> 'Git Host Key Verification Configuration' and configure host key verification.
 > git.exe fetch --tags --force --progress -- https://github.com/gglss/jm_system_autotest.git +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git.exe fetch --tags --force --progress -- https://github.com/gglss/jm_system_autotest.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: fatal: unable to access 'https://github.com/gglss/jm_system_autotest.git/': OpenSSL SSL_read: Connection was reset, errno 10054

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2697)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:87)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:852)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1229)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1312)
	at hudson.scm.SCM.checkout(SCM.java:540)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1239)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)
	at hudson.model.Run.execute(Run.java:1899)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:107)
	at hudson.model.Executor.run(Executor.java:449)
ERROR: Error cloning remote repo 'origin'
[trading_system_autotest] $ C:\Users\DD\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\Allure\bin\allure.bat generate -c -o C:\Users\DD\.jenkins\workspace\trading_system_autotest\allure-report
allure-results does not exist
Report successfully generated to C:\Users\DD\.jenkins\workspace\trading_system_autotest\allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: FAILURE
写回答

1回答

william

2022-10-06

https://blog.csdn.net/wjh1840226173/article/details/124355167

试试这个

git config --global http.sslVerify "false"

0
2
william
嗯,你Jenkins在本地,就在本地输入
2022-10-07
共2条回复

Selenium3+Pytest+Allure 全流程实战自动化测试

应用主流测试工具,从功能测试转型自动化测试

636 学习 · 227 问题

查看课程