Arv*_*ind 45 git github-for-windows
$ git pull origin master
fatal: unable to access 'https://xxxxxxxxxxxxxxx':
error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/Programs/Git/usr/bin/curl-ca-bundle.crt
CApath: none
Run Code Online (Sandbox Code Playgroud)
当我拉或推我的代码时,我收到此错误.
请指导我解决这个问题.
Cod*_*ard 47
使用时,https您需要提供密码或使用证书.在您的情况下,证书看起来不是有效证书.
尝试通过告诉git在哪里找到证书来修复它:
// Add the certificate to your configuration file
git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
Run Code Online (Sandbox Code Playgroud)
或者,您可以禁用SSL检查:
// or switch off SSL checks completely by executing:
git config --system http.sslverify false
Run Code Online (Sandbox Code Playgroud)
在您的配置中设置此选项仅为给定的URL而不是所有请求禁用它
[http "https://weak.example.com"]
sslVerify = false
Run Code Online (Sandbox Code Playgroud)
http.sslVerify获取或推送HTTPS时是否验证SSL证书.
http.sslCAInfo包含证书的文件,用于在获取或推送HTTPS时验证对等方
Ren*_*ink 25
我曾经遇到过同样的问题.重新安装git for windows后出现问题.我在Windows 10上使用git for Windows 64位.
我发现安装程序不再安装git了C:/Users/[USER_NAME]/AppData/Local/Programs/Git.而是安装它
C:\Program Files\Git.
然而C:\ProgramData\Git\config,安装程序未编辑旧的配置文件.此文件仍包含旧路径,因此我手动编辑它.
例如,在我使用的系统上
[http]
sslCAInfo = C:/Programme/Git/mingw64/ssl/certs/ca-bundle.crt
Run Code Online (Sandbox Code Playgroud)
也许你将不得不使用Program Files替代
sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
Run Code Online (Sandbox Code Playgroud)
编辑
就像DS在评论中说的那样
需要以管理员身份编辑C:\ ProgramData\Git\config .
例如,右键单击记事本并选择"以管理员身份运行",然后打开文件.
小智 24
我也在Windows中遇到这个问题并使用gitbash运行git.我刚刚重新安装了gitbash,而gitbash自动管理了git证书及其所需的路径.
小智 12
在git-bash的2.x版中,.crt的路径已更改为../Git/mingw64/ssl/certs/ca-bundle.crt.我不得不在git-bash中手动更新
git config --global http.sslcainfo "/path/to/Git/mingw64/ssl/certs/ca-bundle.crt"
Run Code Online (Sandbox Code Playgroud)
试试这个
git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
Run Code Online (Sandbox Code Playgroud)
要么
运行此命令关闭SSL
git config --system http.sslverify false
Run Code Online (Sandbox Code Playgroud)
git config --global http.sslverify "false"
Run Code Online (Sandbox Code Playgroud)
当 git 客户端无法找到 ssl 的可信 CA 时,可能会出现此问题。如果您使用的是 Windows,请尝试从https://gitforwindows.org/重新安装它。
在安装过程中,选择“使用本机 Windows 安全通道库”选项。该选项将允许您使用公司的内部根 CA 证书而不是默认的 ca-bundle.crt
| 归档时间: |
|
| 查看次数: |
49415 次 |
| 最近记录: |