How to limit interactions in a remote git repo?

76 views Asked by At

I have a git repo and I want kinda 'lock' it for a while so no one can use (clone/pull/push etc.) it. But I don't want to delete it. How do I do it?

1

There are 1 answers

0
OhleC On BEST ANSWER

You could install a pre-receive hook on the remote that will always exit with a non-zero exit value, and ideally print some helpful message.

This wouldn't prevent cloning, but since you certainly can't do anything about existing clones anyway, I don't think there's much value in that.

If you want to prevent everything, you'll have to disable it on the transport layer (be it ssh, http or whatever)