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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48555969/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 16:48:08  来源:igfitidea点击:

Error setting certificate verify locations - Github

gitbashsslgithub

提问by Junaid

I am having problem accessing github repository through Git Bash.

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

2 days ago I was able to push/pull the repositories. Then

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

1) I created an account on gitlab.com

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

2) I generated ssh key on my local pc following GitLab and SSH keysusing git bash on windows

2) 我在 Windows 上使用git bash遵循GitLab 和 SSH 密钥在本地 PC 上生成了 ssh 密钥

3) After this I did not create/pull/push any repository on gitlab.

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

Today I make few changes in a code (that is deployed on github), when I try to push that code I get following error

今天,我对代码(部署在 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

There is no sslfolder in libexec

libexec 中没有ssl文件夹

libexec folder

libexec 文件夹

Also no file/folder changed in Git folder since Jan 2017

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

enter image description here

在此处输入图片说明

It seems like git-bash issue, not sure. Can anyone help ?

这似乎是 git-bash 问题,不确定。任何人都可以帮忙吗?

采纳答案by VonC

First, creating ssh keys won't help for an HTTPS url.
Keep those keys, but if you want to use them, you would need to put existing ssh keys to your github accountthen

首先,创建 ssh 密钥对 HTTPS url 没有帮助。
让那些键,但如果你想使用它们,你就需要把现有的SSH密钥到您的github帐户,然后

 cd /path/to/your/repo
 git remote set-url origin [email protected]:junaidbinsarfraz/repo.git
 git push

Second, regarding the cert error, try to push from a simple CMD, using a simplified PATH as I do here, with said PATH referencing the very latest Git for Windows.
For that, uncompress PortableGit-2.16.1-64-bit.7z.exeanywhere you want.

其次,关于证书错误,尝试从一个简单的 CMD 推送,使用简化的 PATH ,就像我在这里所做的那样,所述 PATH 引用最新的 Git for Windows
为此,请PortableGit-2.16.1-64-bit.7z.exe在您想要的任何位置解压缩。