Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected http response: '' when used as http proxy of git #534

Closed
Patrick-Ze opened this issue May 24, 2023 · 0 comments
Closed

Unexpected http response: '' when used as http proxy of git #534

Patrick-Ze opened this issue May 24, 2023 · 0 comments

Comments

@Patrick-Ze
Copy link

Expected Behavior

http代理应和git正常配合工作

Current Behavior

启动的http代理能够正常进行网页访问等操作,但是无法作为git的http代理。具体步骤见后文

Possible Solution

水平不足以提出

Steps to Reproduce

具体操作如下:

  1. 软件版本 free_13.1 (Windows平台)
  2. 使用如下命令启动http代理 proxy http -t tcp -p localhost:8899
  3. ~/.ssh/config内进行如如下配置
Host gitlab.domain.com
  ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -H localhost:8899 %h %p
  1. 测试ssh连接情况:OK
ssh -T git@gitlab.domain.com
Welcome to GitLab, @user!
  1. 测试clone/fetch等git相关操作:出现问题
git clone git@gitlab.domain.com:user/gitdemo.git
Cloning into 'gitdemo'...
ERROR: Unexpected http response: ''.
FATAL: failed to begin relaying via HTTP.
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Context (Environment)

  1. proxy version is : free_13.1
  2. full command is :proxy http -t tcp -p localhost:8899
  3. system is : Windows 10 22H2 (OS Build 19045.2965)
  4. full log is:
2023/05/24 13:53:54.073755 INFO tcp http(s) proxy on 127.0.0.1:8899
2023/05/24 13:54:02.322137 INFO CONNECT:gitlab.domain.com:22
2023/05/24 13:54:02.322137 INFO use parent : false, gitlab.domain.com:22
2023/05/24 13:54:02.343928 INFO conn 127.0.0.1:3804 - 127.0.0.1:8899 <-> 10.8.21.3:3805 - 120.26.124.249:22 connected [gitlab.domain.com:22]
2023/05/24 13:54:03.231281 INFO conn 127.0.0.1:3804 - 127.0.0.1:8899 <-> 10.8.21.3:3805- 120.26.124.249:22 released [gitlab.domain.com:22]
2023/05/24 13:54:08.830796 WARN decoder error , from 127.0.0.1:3809, ERR:http decoder read err: read client http header err: read tcp 127.0.0.1:8899->127.0.0.1:3809: i/o timeout
2023/05/24 13:54:13 Received an interrupt, stopping services...
2023/05/24 13:54:13.297558 WARN accept error , ERR:accept tcp 127.0.0.1:8899: use of closed network connection

Detailed Description

请问是否是配置不当或者有什么排查建议?

Possible Implementation

水平不足以提出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant