Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Unauthenticated git-upload-pack/git-receive-pack request

Hello,

When using http to connect to git server, there is always a unauthenticated request before authenticated one. Git server access log shows:
----
127.0.0.1 - - [27/Feb/2017:16:53:28 +0800] "GET /tac621git.git/info/refs?service=git-upload-pack HTTP/1.1" 401 401
127.0.0.1 - admin [27/Feb/2017:16:53:28 +0800] "GET /tac621git.git/info/refs?service=git-upload-pack HTTP/1.1" 200 320
127.0.0.1 - - [27/Feb/2017:16:55:33 +0800] "GET /tac621git.git/info/refs?service=git-receive-pack HTTP/1.1" 401 401
127.0.0.1 - admin [27/Feb/2017:16:55:33 +0800] "GET /tac621git.git/info/refs?service=git-receive-pack HTTP/1.1" 200 185
----

It seems org.eclipse.jgit.transport.TransportHttp::connect by default using HttpAuthMethod.Type.NONE. Only when authentication failed it update AuthMethod with the value from response.

The problem is some git server has limit on denied requests per second. And when exceed that limit server will cut all request from the same ip for a period of time, causing all git related function unavailable.

I think there should be a way to eliminate unauthenticated request, but found none in code. Please do tell me if there a way to achieve that.

And if there is not. Will it be implemented soon? I'm not sure whether I should raise a bug or change request.

Thanks and Regards,
Hetty



Back to the top