git - 设置证书验证位置时出错 - Github

标签 git bash ssl github

我在通过 Git Bash 访问 github 存储库时遇到问题。

2 天前,我能够推送/pull 存储库。然后

1) 我在 gitlab.com 上创建了一个帐户

2) 我在本地电脑上按照 GitLab and SSH keys 生成了 ssh key 在 Windows 上使用 git bash

3) 之后我没有在 gitlab 上创建/pull/推送任何存储库。

今天我对代码(部署在 github 上)做了一些改动,当我尝试推送该代码时出现以下错误

fatal: unable to access 'https://github.com/junaidbinsarfraz/repo.git/': error setting certificate verify locations:
  CAfile: E:/Softwares/Git/mingw64/libexec/ssl/certs/ca-bundle.crt
  CApath: none

libexec 中没有ssl 文件夹

libexec folder

自 2017 年 1 月以来,Git 文件夹中的文件/文件夹也没有更改

enter image description here

这似乎是 git-bash 的问题,不确定。谁能帮忙?

最佳答案

在我的例子中,在 Windows 上,在设置 namee mail 以及 git config 的证书路径后它不工作。从命令提示符运行以下命令修复了这个问题。

git config --global http.sslcainfo "C:\Program Files\Git\usr\ssl\certs\ca-bundle.crt"

ca-bundle.crt 的路径可能因您的情况而异。

关于git - 设置证书验证位置时出错 - Github,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48555969/

相关文章:

git - 为什么在执行 git revert 时会发生冲突?

bash - 间接扩展后有没有办法知道数组的键?

objective-c - iOS9 WKWebview didReceiveAuthenticationChallenge 调用主机为空

ssl - SAML over SSL - SAML token

git - 在 Git Bash 上运行 "git difftool"会打开 Visual Studio 的多个空实例

git stash 报告 : '' is not a stash reference

mysql - 如何选择使用哪个数据库?

bash - 根据 awk w/o header 中的名称子字符串的数字排序连接文件

ssl - HSTS:当我没有子域时使用 includeSubdomains

Github GitIgnore 错误