这对我有用(我正在使用Manjaro linux)。我运行cmd来查看ca证书:
$ curl-config --ca
**/etc/ssl/certs/ca-certificates.crt**
但是实际上我在路径中找到了证书:
**/etc/ca-certificates/extracted/ca-bundle.trust.crt**
然后将配置添加到〜/ .gitconfig(如果不存在,请创建它):
**vim ~/.gitconfig**
[http]
sslVerify = true
sslCAinfo = /etc/ca-certificates/extracted/ca-bundle.trust.crt
[user]
email = <email of github account>
name = <username of github account>
有用!
.rbenv]$ git pull
remote: Counting objects: 70, done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 70 (delta 39), reused 12 (delta 12), pack-reused 6
Unpacking objects: 100% (70/70), done.
From https://github.com/sstephenson/rbenv
c43928a..efb187f master -> origin/master
+ 37ec781...7e57b52 user-gems -> origin/user-gems (forced update)
Updating c43928a..efb187f
Fast-forward
libexec/rbenv-init | 4 ++--
libexec/rbenv-version-file | 1 +
test/init.bats | 2 +-
test/test_helper.bash | 25 +++++++++++++++----------
4 files changed, 19 insertions(+), 13 deletions(-)