天天看點

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      
Jenkins+GitHub報錯hudson.plugins.git.GitException: Failed to fetch from GitHub 443

永久解決:配置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郵箱"      
Jenkins+GitHub報錯hudson.plugins.git.GitException: Failed to fetch from GitHub 443

3. 檢視公鑰并配置GitHub

檢視

cat /root/.ssh/id_rsa.pub      
Jenkins+GitHub報錯hudson.plugins.git.GitException: Failed to fetch from GitHub 443

GitHub配置

https://github.com/settings/ssh/new      
Jenkins+GitHub報錯hudson.plugins.git.GitException: Failed to fetch from GitHub 443

檢視私鑰并配置項目

檢視私鑰

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

使用[email protected] 進行管理

Jenkins+GitHub報錯hudson.plugins.git.GitException: Failed to fetch from GitHub 443

添加私鑰憑證

Jenkins+GitHub報錯hudson.plugins.git.GitException: Failed to fetch from GitHub 443

繼續閱讀