首页 > 解决方案 > Ubuntu证书问题

问题描述

我正在尝试在装有 Ubuntu 的机器上使用 curl 和 git。我正在阅读设置 vim 的教程,但遇到了证书问题。我跑了

sudo curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

我收到以下错误:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (77) error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs

同样,当我尝试运行 git clone 时,我收到以下错误。

Cloning into '/home/umar/.vim/bundle/Vundle.vim'...
fatal: unable to access 'https://github.com/VundleVim/Vundle.vim.git/': server certificate verification failed. CAfile: none CRLfile: none

我检查了 /etc/ssl/certs/ca-certificates.crt 是否存在并且确实存在。我对 linux 很陌生,对证书有非常基本的了解。什么可能导致这些问题?

标签: ubuntucurlcertificateca

解决方案


我不得不重新安装 ca-certificates 包,它解决了这个问题。


推荐阅读