docs: 推送报错解决方案

This commit is contained in:
ChenHongYu 2025-03-02 17:14:23 +08:00
parent d57f700b51
commit 3507dc6c52

View File

@ -76,6 +76,93 @@
- 请将`public`文件夹设置为 **Excluded**:右键 -> mark as -> excluded folder - 请将`public`文件夹设置为 **Excluded**:右键 -> mark as -> excluded folder
- 否则svg等静态文件的命名空间等信息会报错。 - 否则svg等静态文件的命名空间等信息会报错。
## Q&A
- git进行push报错出现<br>
fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
```markdown
# Git代理配置及问题解决
当出现以下错误时可能是Git无法通过指定的代理连接到目标服务器
```
fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to connect to 127.0.0.1 port 7890 after 2054 ms: Couldn't connect to server
```
## 解决方法
### 1. 检查Clash代理设置
- **确保Clash已启动**
确保Clash程序正在运行并且已激活代理。
- **确认代理端口**
确保你在Clash中配置的HTTP或SOCKS代理的端口是正确的比如7890或7891。可以在Clash的配置界面或日志中查看当前的代理设置。
- **检查Clash的代理规则**
确保你的代理规则能够正确处理到GitHub的请求。
### 2. 测试代理连接
在终端中使用`curl`命令,测试代理是否能够正常工作:
- 如果使用HTTP代理
```bash
curl -x http://127.0.0.1:7890 https://github.com
```
- 如果使用SOCKS代理
```bash
curl -x socks5://127.0.0.1:7891 https://github.com
```
如果能够成功响应说明代理正常。如果不能说明可能是Clash的设置问题。
### 3. 直接访问GitHub
通过浏览器直接访问`https://github.com`看是否可以连接。如果可以而Git无法连接可能是Git配置的问题。
### 4. 检查Git的SSL设置
在某些情况下Git的SSL设置可能会影响连接
```bash
git config --global http.sslVerify false
```
> **注意**禁用SSL验证会影响安全性通常不建议这样做。
### 5. 更新Git版本
确保你的Git是最新版本。有时较旧版本的Git可能会与代理服务器不兼容。
### 6. 确保没有其他代理干扰
确认没有其他程序如VPN或其他代理干扰Git的连接。
### 7. 尝试其他Git协议
如果使用HTTPS存在问题尝试SSH。如果你的GitHub账号已经配置了SSH密钥可以使用SSH方式克隆仓库
```bash
git clone git@github.com:MultipledMe/PGuide-Docs.git
```
### 8. 重新配置Git代理
如果以上步骤都无法解决问题可以尝试重新配置Git的代理设置确保没有任何拼写错误或其他问题
```bash
git config --global --unset http.proxy
git config --global --unset https.proxy
# 然后再重新设置
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
```
```
此Markdown文档可以直接在支持Markdown的编辑器中查看和使用。希望这对你有帮助
## 文档 ## 文档
- [vuepress](https://vuepress.vuejs.org/) - [vuepress](https://vuepress.vuejs.org/)