[英]How to respond to git clone command using NGIT
Using NGit (or even JGit since it's a port) does anyone know how to respond to the Git clone command over Smart HTTP? 使用NGit(或者甚至是JGit,因为它是端口),有人知道如何通过Smart HTTP响应Git clone命令吗? What would the sample code look like?
示例代码是什么样的?
I can't find any references or documentation which describes this. 我找不到任何描述此内容的参考文献或文档。
I'm trying to create a .NET GIT server to handle simple clone, push and pull requests. 我正在尝试创建一个.NET GIT服务器来处理简单的克隆,推送和拉取请求。
Any help is appreciated. 任何帮助表示赞赏。
See my fork of GitAspx at https://github.com/linquize/git-dot-aspx 在https://github.com/linquize/git-dot-aspx上查看我的GitAspx分支
Recently it supports NGit as backend, as the original GitSharp is out of date and buggy Make sure you host it in IIS. 最近,它支持NGit作为后端,因为原始的GitSharp已经过时且存在错误。请确保将其托管在IIS中。 Development server does not support http 1.1
开发服务器不支持http 1.1
You should be able to use the org.eclipse.jgit.http.server.GitServlet
to handle fetch and push requests over Smart HTTP. 您应该能够使用
org.eclipse.jgit.http.server.GitServlet
通过Smart HTTP处理获取和推送请求。
The specific servlet that handles Smart fetch is the UploadPackServlet . 处理Smart fetch的特定servlet是UploadPackServlet 。
There is a SimpleHttpServer class which is an example Smart HTTP enabled server in the org.eclipse.jgit.junit.http project. 在org.eclipse.jgit.junit.http项目中有一个SimpleHttpServer类,该类是启用Smart HTTP的示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.