Jenkins+GitHub报错hudson.plugins.git.GitException: Failed to fetch from GitHub 443

偶然?总是?

在配置 源码管理的时候

使用https 进行代码的下载

配置的是用户名和密码

但是在执行构建的时候,总是会报错 443,但是偶尔也会有几次成功下载的,所以就很奇怪!!!!!!!!!!

fatal: unable to access 'https://github.com/xxx': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

image.png

永久解决:配置SSH

使用Docker安装的Jenkins

!!! 非docker安装的,忽略 第一步:进入容器

1. 进入容器

[root@iZ2zeblcb2evknzc1xbhunZ ~]# docker exec -it 容器ID /bin/bash

2. 生成密钥

bash-5.1# ssh-keygen -t rsa -b 4096 -C "GitHub邮箱"

image.png

3. 查看公钥并配置GitHub

查看

cat /root/.ssh/id_rsa.pub

image.png

GitHub配置

https://github.com/settings/ssh/new

image.png

查看私钥并配置项目

查看私钥

bash-5.1# cat /root/.ssh/id_rsa

使用git@git.com 进行管理

image.png

添加私钥凭证

image.png

  • 15
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论
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
02-08

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员半夏

你的打赏,我的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值