‘receive-pack’: service not enabled for ‘./.git’

Simply run

git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack

(on computer A, instead of the original git daemon command), and the push works.

Note that you have to then run

git reset --hard

on computer A to make it “see” the changes from computer B.

Post Script

The problem with doing a hard reset is that it overwrites whatever local changes you had on computer A.

Eventually I realized it would make much more sense to have a separate repository (a bare clone) that doesn’t have any files in it, then have computer B push to it and computer A pull from it. This way it can work both ways and merge all the changes in a smooth fashion. You can even have two bare clones, one on each computer, and push-pull between them.

Leave a Comment