BlackBytesBox.Routed.GitBackend 0.1.20251.62076

dotnet add package BlackBytesBox.Routed.GitBackend --version 0.1.20251.62076
                    
NuGet\Install-Package BlackBytesBox.Routed.GitBackend -Version 0.1.20251.62076
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlackBytesBox.Routed.GitBackend" Version="0.1.20251.62076" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlackBytesBox.Routed.GitBackend" Version="0.1.20251.62076" />
                    
Directory.Packages.props
<PackageReference Include="BlackBytesBox.Routed.GitBackend" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlackBytesBox.Routed.GitBackend --version 0.1.20251.62076
                    
#r "nuget: BlackBytesBox.Routed.GitBackend, 0.1.20251.62076"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=BlackBytesBox.Routed.GitBackend&version=0.1.20251.62076
                    
Install BlackBytesBox.Routed.GitBackend as a Cake Addin
#tool nuget:?package=BlackBytesBox.Routed.GitBackend&version=0.1.20251.62076
                    
Install BlackBytesBox.Routed.GitBackend as a Cake Tool

BlackBytesBox.Routed.GitBackend

This project provides ASP.NET Core middleware to expose bare Git repositories over HTTP using Git's git-http-backend mechanism.

⚠️ Experimental

This is an experimental setup and not recommended for production environments without proper hardening and security review.


🧰 Prerequisites

Ensure that git-http-backend.exe is present (typically found under mingw64/libexec/git-core/).


🚀 Usage

To enable Git HTTP support in your ASP.NET Core app:

app.UseGitBackend(
    @"C:\gitremote",
    @"C:\Program Files\Git\mingw64\libexec\git-core\git-http-backend.exe",
    "/gitrepos",
    (repoName, username, password) =>
    {
        // Custom credential validation logic
        return string.Equals(username, "gituser", StringComparison.OrdinalIgnoreCase)
            && string.Equals(password, "secret", StringComparison.Ordinal)
            && repoName.Equals("MyProject.git", StringComparison.OrdinalIgnoreCase);
    });

🗂️ Repository Initialization

Repositories must be manually initialized as bare repositories:

git -C C:\gitremote init --bare MyProject.git
git -C C:\gitremote\MyProject.git config http.receivepack true

📦 Middleware Overview

The GitBackendMiddleware class:

  • Invokes git-http-backend.exe with CGI-style environment setup.
  • Parses requests under a specific base path (e.g., /gitrepos).
  • Performs Basic Authentication via a user-supplied delegate.
  • Streams Git protocol requests and responses.

Requirements:

  • Middleware must be explicitly added in the pipeline.
  • Authentication logic must be customized per your use case.


📌 Notes

  • Only .git-suffixed repo paths will be processed.
  • This middleware uses git-http-backend, not a custom Git implementation.
  • Repository path traversal is blocked and validated.
  • This component assumes you understand Git internals and ASP.NET Core middleware.
  • ✅ If you're using self-signed HTTPS certificates, Git clients can still work by disabling SSL verification:
git -c http.sslVerify=false clone https://localhost:5001/gitrepos/MyProject.git

Or configure the cloned repository to permanently skip SSL validation (for dev/testing only):

git -C C:\gitlocal\MyProject config http.sslVerify false

✅ Example Clone URL

git clone http://localhost:5000/gitrepos/MyProject.git

Enjoy hacking Git over HTTP!


MIT License. Provided as-is with no warranty.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.20251.62076 45 3 days ago
0.1.20251.53779 120 9 days ago

Release Notes – 0.1.* (2025-03-30)
===================================

Status: Early Development Phase
--------------------------------
This release continues the foundational development of the software.
As progress towards version 1.0, the focus remains on refining core
functionalities, improving stability, and integrating key features.
Users should expect frequent updates, iterative refinements, and
potential changes as the project matures.

What's New & Improved?
----------------------
- Active core development with ongoing refinements.
- Initial groundwork for future stable releases.

Third-Party Notices
--------------------
Third-party dependencies and their respective licenses are documented
in the `THIRD-PARTY-NOTICES.txt` file, located in the root of the
repository. Please review this file to ensure compliance with any
relevant licensing terms.