我在通过 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 文件夹
自 2017 年 1 月以来,Git 文件夹中的文件/文件夹也没有更改
这似乎是 git-bash 的问题,不确定。谁能帮忙?
最佳答案
在我的例子中,在 Windows 上,在设置 name
、e 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/