2

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?

IKo
  • 4,998
  • 8
  • 34
  • 54

1 Answers1

4

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)

OhleC
  • 2,821
  • 16
  • 29