国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

git操作出錯顯示fatal: unable to access ‘https://github.com/xxxx/xxxx.git/‘: SSL certificate problem:

這篇具有很好參考價值的文章主要介紹了git操作出錯顯示fatal: unable to access ‘https://github.com/xxxx/xxxx.git/‘: SSL certificate problem:。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

git操作通過https鏈接從Github克隆倉庫到本地總報錯(Windows11)并且重新設(shè)置ssh key也沒用的情況下

每次操作完git clone都顯示如下內(nèi)容
Cloning into ‘xxxx’…
fatal: unable to access ‘https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git/’: SSL certificate problem: unable to get local issuer certificate
包括git push以后也同樣報錯fatal:unable to…
這里提供一種解決錯誤的辦法,符合條件即可使用

二者解決方式很接近,都是將后面粘貼的地址進(jìn)行一些改動,所以不重復(fù)贅述,只說git clone時報錯的解決辦法。

$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git
Cloning into 'YOUR-REPOSITORY'...
fatal: unable to access 'https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git/': SSL certificate problem: unable to get local issuer certificate

當(dāng)時網(wǎng)上很多操作都試過,大部分都是告訴我重新設(shè)置ssh key,但是我也配置過很多次,都仍然報錯,后面自己通過Github官方文檔查到了問題根源所在。
解決辦法:
參考文檔:
權(quán)限被拒絕(公鑰)
SSH故障排除
本人是Windows11操作系統(tǒng)
先通過嘗試嘗試連接到 git@github.com 來檢查使用的密鑰:
在git bash中輸入以下命令:

ssh -vT git@github.com

然后會出現(xiàn)一長串內(nèi)容,我這里只留關(guān)鍵的幾行:

OpenSSH_9.1p1, OpenSSL 1.1.1s  1 Nov 2022
debug1: Reading configuration data /c/Users/xxxxx/.ssh/config
debug1: /c/Users/89443/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to ssh.github.com [20.205.243.160] port 443.
debug1: Connection established.
[ssh.github.com]:443 / (none)
debug1: client_input_hostkeys: searching /c/Users/89443/.ssh/known_hosts2 for [ssh.github.com]:443 / (none)
debug1: client_input_hostkeys: hostkeys file /c/Users/89443/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi kxjh990528! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2104, received 2344 bytes, in 0.6 seconds
Bytes per second: sent 3488.6, received 3886.5
debug1: Exit status 1

可以看到其中幾行
git操作出錯顯示fatal: unable to access ‘https://github.com/xxxx/xxxx.git/‘: SSL certificate problem:
這里顯示port 443,表示我們當(dāng)前鏈接到Github是通過端口443進(jìn)行鏈接。一般網(wǎng)絡(luò)上提供的方法基本都是通過默認(rèn)端口22進(jìn)行鏈接,改端口太麻煩了于是我參考了官方文檔SSH故障排除選擇了一種更簡捷有效的辦法進(jìn)行鏈接。
在 HTTPS 端口使用 SSH
有時,防火墻會完全拒絕允許 SSH 連接。
如果無法選擇使用具有憑據(jù)緩存的 HTTPS 克隆,可以嘗試使用通過 HTTPS 端口建立的 SSH 連接克隆。
大多數(shù)防火墻規(guī)則應(yīng)允許此操作,但代理服務(wù)器可能會干擾。
輸入以下命令:

$ ssh -T -p 443 git@ssh.github.com

若出現(xiàn)

> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.

則證明鏈接成功未被防火墻干擾。
要測試通過 HTTPS 端口的 SSH 是否可行,請運行以下 SSH 命令:

$ git clone ssh://git@ssh.github.com:443/YOUR-USERNAME/YOUR-REPOSITORY.git

注意:端口 443 的主機(jī)名為 ssh.github.com,而不是 github.com。
就是說把剛才的

$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git

改成

$ git clone ssh://git@ssh.github.com:443/YOUR-USERNAME/YOUR-REPOSITORY.git

即可使用。

Host github.com
Hostname ssh.github.com
Port 443
User git

如果還是不行請繼續(xù)參考官方文檔指南權(quán)限被拒絕(公鑰)文章來源地址http://www.zghlxwxcb.cn/news/detail-444728.html

到了這里,關(guān)于git操作出錯顯示fatal: unable to access ‘https://github.com/xxxx/xxxx.git/‘: SSL certificate problem:的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包