Even with #781300: option to lock project short name we're going to need something that notices when new project nodes exist on d.o (perhaps the maintainer has to request a repo via the UI somehow) that can turn around and create the appropriate Git repository on git.d.o.

It's possible that gitolite solves this for us, but it's also possible we won't be using gitolite depending on what happens over at #714034: Determine the access control solution for git. ;)

If this isn't solved automatically, I'd strongly favor an architecture that avoids giving httpd write access to Git. ;) For example, there's a dirty bit on project nodes that's set when a project needs a git repo for itself. Something on git.d.o queries for projects with the dirty bit set, creates the repos, and clears the dirty bit. Or whatever.

Just capturing an issue for this since Sam and I were discussing this, especially as relates to #851208: Create a d.o clone for Git development.

Comments

damien tournoud’s picture

Gitolite or not, there is probably no explicit creation required here, as Git will initialize the repository on the first push.

But of course, we need to set up the access control rules needed when a new project is added.

marvil07’s picture

I tried some simple examples to figure if git actually _create repo_ on push, and I it seems that it can not.

# creating a basic repo
mkdir original-repo
cd original-repo/
git init
# Initialized empty Git repository in /home/marvil/tmp/gt/original-repo/.git/
echo "test" > test.txt
git add test.txt
git commit -m"initial commit"
#[master (root-commit) c866ae2] initial commit
# 1 files changed, 1 insertions(+), 0 deletions(-)
# create mode 100644 test.txt
git remote add origin `dirname $(pwd)`/pushed-repo
git push origin master 
# fatal: '/home/marvil/tmp/gt/pushed-repo' does not appear to be a git repository
# fatal: The remote end hung up unexpectedly
# trying to create the directory first also fails
mkdir ../pushed-repo
git push origin master 
# fatal: '/home/marvil/tmp/gt/pushed-repo' does not appear to be a git repository
# fatal: The remote end hung up unexpectedly

In the other side, like mentioned before either gitosis or gitolite do the work right, so definitely there should be a way to do this.

sdboyer’s picture

Talked with nnewton, and he's a fan of a job queuing system to drive this process. We're currently leaning towards beanstalk.

sdboyer’s picture

Priority: Normal » Critical
webchick’s picture

Status: Active » Postponed

Implementation of this is dependent on #893108: Decide on job queueing system.

marvil07’s picture

Project: Drupal.org infrastructure » The Great Git Migration
Component: Git » Commit access process
Status: Postponed » Closed (duplicate)

Duplicating this in favour of #910562: Implement a git-shell wrapper with python-twisted since IIRC I have seen it creating git repos in the sprint 4 demo.