A walkthrough of building a custom Git remote helper that uses gRPC as the transport protocol instead of HTTPS or SSH. The post covers defining a protobuf schema with bidirectional streaming, implementing the client-side git-remote-grpc executable in Go, and building the server-side handler that invokes native git-receive-pack and git-upload-pack executables. The result allows cloning Git repositories over gRPC using a custom grpc:// URL scheme, enabling seamless integration with existing gRPC-based backend infrastructure including its authentication and encryption mechanisms.
Table of contents
Enter git-remote-helpersImplementing git-remote-grpcImplementing the gRPC serverPutting it all together1 Impression