2017-04-06 208 views
4

我使用OSX:10.12.4SSL:「無法獲取本地頒發者證書」

我本來能夠使用git,自制軟件和捲曲沒有任何問題。我不記得我做了什麼,但突然間,這些SSL錯誤開始出現在我的git命令中。

我得到unable to get local issuer certificate運行任何git命令時出錯。另外,當使用brew install git嘗試重新安裝git時出現錯誤。

釀造輸出的相關部分:

Downloading https://www.kernel.org/pub/software/scm/git/git-2.12.2.tar.xz 

curl: (60) SSL certificate problem: unable to get local issuer certificate 
More details here: https://curl.haxx.se/docs/sslcerts.html 

我曾嘗試:

  • 重啓
  • 移動〜/圖書館/鑰匙扣文件夾複製到〜/桌面,然後重新啓動
  • 在Safari瀏覽器上導航到https://www.kernel.org/pub/software/scm/git,以及 viewing the certificate。根據[這些說明](不能發佈超過2個鏈接,對不起),應該有一個複選框「始終信任」該網站。我沒有看到這個複選框。
  • 我打算嘗試鑰匙串急救,但是,這個功能已經在最近的Mac OS中被刪除了。
  • 我試着尋找許多其他類似的問題,但是,很多人都無法理解或遵循答案中的說明。

例如,也許squid808的answer到一個類似的問題可以幫助我。他說:「相反,它是我們領域的根CA證書,我應該出口並告訴Git信任。」我幾乎不瞭解這是什麼意思,或者它與我有關,或者我會如何去做。根據我的研究,這似乎更適合運行服務器的人。它也似乎是Windows,而我在Mac上。

我明白,作爲一個臨時修復我除了可以使用git config --global http.sslVerify false在捲曲-k選項。這些解決方法是不安全的,所以我想讓我的SSL安全備份並儘快運行。

如果下面的嘗試我做的curl -L https://homebrew.bintray.com/bottles/libpng-1.6.29.sierra.bottle.tar.gz | bash -s stable(釀造嘗試的一部分同樣失敗)輸出

% Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
    0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:--  0curl: (60) SSL certificate problem: unable to get local issuer certificate 
More details here: https://curl.haxx.se/docs/sslcerts.html 

curl performs SSL certificate verification by default, using a "bundle" 
of Certificate Authority (CA) public keys (CA certs). If the default 
bundle file isn't adequate, you can specify an alternate file 
using the --cacert option. 
If this HTTPS server uses a certificate signed by a CA represented in 
the bundle, the certificate verification probably failed due to a 
problem with the certificate (it might be expired, or the name might 
not match the domain name in the URL). 
If you'd like to turn off curl's verification of the certificate, use 
the -k (or --insecure) option. 

道歉

  • 解決這個看似零散,無序,這是因爲我很困惑,如果這是一個與git,curl更相關的問題,或者一般來說可能既不是也不僅僅是SSL證書。請讓我知道這個問題的標籤是否應該修復。
  • 我可以發佈更多相關鏈接和圖片,但我受到聲望的限制。

我有另一個帳戶,我無法保持良好的聲譽。我試圖找出並解決我之前做錯的所有事情。任何關於如何改善這個問題的質量的反饋將不勝感激。謝謝。

+1

'\ curl -L |是什麼輸出? bash -s stable' – CodeWizard

+0

@CodeWizard看到我更新的問題。 –

回答

1

這是類似於報道在Homebrew/brew issue 1625,並通過Eduard Rozenberg (edrozenberg)記載:

發音相似的問題也通過ATP播客的約翰·錫拉庫紮在12月7日報道播客。

對這個問題最有可能觸發:啓用iCloud的鑰匙扣在iCloud中設置當問題發生

一個或多個觀察到的症狀:

  • 是鑰匙圈已經是一個彈出的MacOS消息修復/重置
  • 查看鑰匙串訪問工具時,鑰匙串看起來是空的並設置爲只讀模式
  • 查看鑰匙串訪問工具時,鑰匙串i在側邊欄缺點是缺少(虛線邊框)
  • 試圖導航到https://google.com谷歌瀏覽器失敗,例如運行BREW搜索PIP的SSL證書錯誤 ,顯示了捲曲(35)證書錯誤消息

的問題可以通過退出和重新啓動來暫時解決。解決問題後,鑰匙串訪問工具將顯示所有鑰匙串及其內容。這個問題很可能會在以後發生。

希望(手指X)Mac OS補丁(可能是10.12.2?)將解決根本原因。

否則,一個想法是禁用iCloud首選項中的iCloud Keychain選項(尚未嘗試)。

既然你在Mac Sierra 10.12.4 ...我懷疑沒有補丁沒有解決這個問題呢。

other issue提到(由jamver):

我遇到過這個問題專門更新到MacOS的塞拉利昂(10.12),從解決方法來從這個傳統,自制票分辨率後:

cd ~ 
sudo wget http://curl.haxx.se/ca/cacert.pem 
export CURL_CA_BUNDLE=~/cacert.pem 

FWIW,這解決了大多數,但不是所有的問題。我通過使用wget手動下載軟件包並將它們放在Homebrew Cache Dir中解決了其他問題。

我很想知道正確的修復方法。例如更新系統ca包?系統包需要Apple補丁嗎?

+0

謝謝。看到我的答案是如何解決這個問題的。 –

4

我需要運行brew doctor並解決問題。然後我需要重新啓動我的shell。最後,在這兩個步驟之後,brew install再次工作。

不幸的是,我無法確定哪個警告指向了犯罪者。當我第一次運行brew doctor時,可能會有大約10次警告。在我意識到需要重新啓動我的shell之前,我清除了很多它們,並在重新啓動後運行。


我想我找到了問題的根源:

Warning: Setting DYLD_* vars can break dynamic linking. 
Set variables: 
    DYLD_LIBRARY_PATH: /Applications/MATLAB/MATLAB_Runtime/v92/runtime/maci64:/Applications/MATLAB/MATLAB_Runtime/v92/sys/os/maci64:/Applications/MATLAB/MATLAB_Runtime/v92/bin/maci64 

註釋掉線

set -x DYLD_LIBRARY_PATH /Applications/MATLAB/MATLAB_Runtime/v92/runtime/maci64:/Applications/MATLAB/MATLAB_Runtime/v92/sys/os/maci64:/Applications/MATLAB/MATLAB_Runtime/v92/bin/maci64 

~/.config/fish/config.fish,然後重新啓動我的外殼似乎解決問題對我來說迄今爲止。


感謝@VonC的引用,導致我的問題試圖brew doctor

+0

不錯的反饋。 +1 – VonC

相關問題