rename content/post to content/posts
This commit is contained in:
1 parent
cda4dbb24b
commit
bcd4bc9282
866 files changed
+43
-25
No files matched your search
@@ -0,0 +1,45 @@
|
||||
---
|
||||
pid: 129
|
||||
title: Failed to connect to github.com port 443 解决方案
|
||||
date: '2024-10-18T16:34:20+08:00'
|
||||
slug: 20241018
|
||||
draft: true
|
||||
author: 小赵同学
|
||||
layout: post
|
||||
status: hidden
|
||||
categories:
|
||||
- 笔记
|
||||
tags: []
|
||||
ai_comment: >-
|
||||
这个解决方案直击核心,但需要注意代理配置是全局生效的。建议在.gitconfig里用includeIf按目录区分代理设置,避免影响其他项目。另外,检测代理是否生效可以先用curl
|
||||
-v测试,再上git操作——毕竟网络问题就像薛定谔的猫,不观测永远不知道死活。
|
||||
---
|
||||
|
||||
最近在使用vscode的时候,使用vscode自带的git一直无法推送上去
|
||||
|
||||
一直使用的是折中的方法,通过GitHub Desktop解决,但是提交切换
|
||||
|
||||
体验感十分割裂,于是寻找解决方法,通过查阅资料,找到以下方法,用以记录和备份
|
||||
|
||||
理论上配置http代理Windows、Linux、Mac OS 中 git 命令一致
|
||||
|
||||
## 配置socks5代理 ##
|
||||
|
||||
```
|
||||
git config --global http.proxy socks5 127.0.0.1:10809
|
||||
git config --global https.proxy socks5 127.0.0.1:10809
|
||||
```
|
||||
|
||||
## 配置http代理
|
||||
|
||||
```
|
||||
git config --global http.proxy 127.0.0.1:10809
|
||||
git config --global https.proxy 127.0.0.1:10809
|
||||
```
|
||||
|
||||
## 注意
|
||||
|
||||
命令中的主机号(127.0.0.1)是使用的代理的主机号
|
||||
|
||||
命令中的端口号(10809)为代理软件的端口号
|
||||
|
||||
Reference in new issue
Block a user