Repository navigation
Closed
Description
Summary
Enable containers to function as Git repositories, allowing users to:
git clonea containergit pushchanges back- Track version history of resources
Motivation
- Familiar workflow - Developers know Git; versioning pods becomes intuitive
- Offline editing - Clone pod locally, edit, push when ready
- Collaboration - Multiple users can branch/merge pod content
- Backup - Clone provides automatic backup
- Version history - Built-in audit trail for all changes
Prior Art
nosdav/server
Already implemented in nosdav using git http-backend:
- nosdav/server@e97e255 - Initial git support
- nosdav/server@4d96539 - Normal and bare repos
- nosdav/server@c47b404 - allowTipSHA1InWant
- nosdav/server@35e1e6e - CORS headers before git
QuitStore
QuitStore - "Quads in Git" - combines Git with RDF/SPARQL for versioned linked data.
Git HTTP Protocol
Implementation Approach
Simple: Shell out to git http-backend
Following nosdav's approach - no npm packages, just use Git's built-in CGI:
import { spawn } from 'child_process';
function handleGitRequest(request, reply) {
const git = spawn('git', ['http-backend'], {
env: {
GIT_PROJECT_ROOT: '/path/to/pods',
GIT_HTTP_EXPORT_ALL: '1',
GIT_HTTP_RECEIVE_PACK: 'true',
PATH_INFO: request.url,
QUERY_STRING: request.query,
REQUEST_METHOD: request.method,
// ... other CGI env vars
}
});
request.raw.pipe(git.stdin);
git.stdout.pipe(reply.raw);
}Detection
Git requests identified by:
*/info/refs?service=git-upload-pack*/git-upload-pack*/git-receive-pack- URLs ending in
.git
Authorization
Use existing WAC - check acl:Read for clone, acl:Write for push.
Questions
- Auto-init: Create
.gitwhen container is created, or on first clone attempt? - Bare vs regular: Bare repos are more efficient for servers
- RDF awareness: Should commits trigger any RDF-specific logic?
- Submodules: Support
.gitsuffix on any container path?
Files to Modify
| File | Change |
|---|---|
src/handlers/git.js |
NEW - Git HTTP backend handler |
src/index.js |
Add git route detection |
src/handlers/container.js |
Optional: init git on container creation |
Effort Estimate
~3-4 hours - mostly porting nosdav's working implementation.
References
Metadata
Metadata
Assignees
Labels
No labels
Activity
Add JIP-0002: Git Support for Containers
melvincarvalho commentedon Dec 27, 2025
Formalized as JIP-0002
This proposal has been written up as JIP-0002 in the JSS Improvement Proposals repository:
https://github.com/JavaScriptSolidServer/jips/blob/main/jip-0002.md
Key points:
git http-backend(no npm packages needed)Security: Block access to dotfiles (.git, .env, etc.)
Address copilot pass 9 on #408
auth: serve /.well-known/did/nostr/<pubkey>.json (#407) (#408)
fix(mcp): correct read-path defects — ACL, truncation, mime, skill er…
merge: MCP v2 review fixes (12 findings) into la3d/lws
[Agent: Claude] fix(lws): JSON-LD conversion arm gets a variant ETag;…
[Agent: Claude] test(lws): pin variant ETags under --lws without --co…
Merge la3d/lws-review: post-drain review round — gate choke point, ET…