centraldogma
centraldogma copied to clipboard
Support Git clone over HTTP in Central Dogma.
Motivation: Adding support for Git clone over HTTP in Central Dogma server would enhance its capabilities and make it more user-friendly. This PR partially addressed #543. Please note that I didn't impelent Git over HTTP fully because:
- We have APIs for commit separately.
- The underlying Git repository could be changed to another format instead of Git.
Modifications:
- Added support for Git clone over HTTP to Central Dogma.
Result:
- You can now clone your repositories via Git clone over HTTP.
git clone -c http.extraHeader="Authorization: Bearer your-token" https://your-dogma.com/foo/bar.git
References:
- https://git-scm.com/docs/protocol-v2/
- https://git-scm.com/docs/protocol-capabilities/
- https://www.git-scm.com/docs/http-protocol
- https://www.git-scm.com/docs/git-upload-pack
- https://git-scm.com/docs/protocol-common
- https://git-scm.com/docs/pack-format/
The CLI command that allows you to view the packets being sent and received:
GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git clone --depth=1 https://github.com/line/armeria.git
As a follow-up, could you also add an integration test that makes sure if this implementation works with Spring Cloud Config Server?
Thanks! Created. 😉 https://github.com/line/centraldogma/issues/955
@trustin, thanks! All addressed. 😉
Codecov Report
Attention: Patch coverage is 81.39535%
with 16 lines
in your changes are missing coverage. Please review.
Project coverage is 66.47%. Comparing base (
aae194c
) to head (f3079e9
). Report is 11 commits behind head on main.
:exclamation: Current head f3079e9 differs from pull request most recent head 7c93f12. Consider uploading reports for the commit 7c93f12 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #954 +/- ##
============================================
- Coverage 66.86% 66.47% -0.40%
- Complexity 3529 3581 +52
============================================
Files 370 377 +7
Lines 14531 14859 +328
Branches 1563 1594 +31
============================================
+ Hits 9716 9877 +161
- Misses 3936 4097 +161
- Partials 879 885 +6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.