Skip to content

Create git repos via push (no server access needed) #30

Description

@melvincarvalho

Summary

Allow users to create git repos on their pod by simply pushing - no SSH/server access required.

Staged Implementation

Stage 1: Push creates new repo

  • Push to non-existent path creates repo automatically
  • ACL generated from authenticated user's WebID (owner + public read)
  • Check write access on parent directory before creating
# Just works - repo created on first push
git init myrepo && cd myrepo
echo "# My Project" > README.md
git add . && git commit -m "init"
git remote add origin https://solid.social/melvin/public/myrepo
git push -u origin main  # Creates repo!

Effort: ~30 minutes

Stage 2: Git-ify existing directories

  • Push to existing non-git directory runs git init there
  • Same logic as Stage 1, just allow existing directories
  • Pushed content becomes the working directory
# Existing /melvin/public/myproject/ becomes a git repo
git remote add origin https://solid.social/melvin/public/myproject
git push -u origin main  # Initializes git in existing dir

Effort: ~15 minutes (small addition to Stage 1)

Stage 3: Snapshot existing files

  • Option A: POST endpoint to init git AND commit existing files
  • Option B: Auto-commit existing files on first git init
# Existing files become initial commit
curl -X POST https://solid.social/melvin/public/myproject/.git/init \
  -H "Authorization: ..."
# Then clone includes existing files

Effort: ~1 hour

Implementation Notes

  • Check parent directory ACL for write access
  • Generate ACL with pusher as owner + public read
  • Reuse existing updateInstead auto-config

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststale-fixedOpen issue whose described problem no longer reproduces on current main; verify and close

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions