In my Ubuntu terminal, I create an empty Git repository in an empty folder, say called "Docs", on a removable hard disk. But the system response me an error message to my command

$ git --bared init --shared
fatal: Could not make /media/HARDDISK/Docs/refs/heads writable by group

I tried different options for "share", e.g., group and all. But it does not work. The initialization works if I remove the --share argument.

| improve this question | | | | |
  • how about sudo git --bared init --share ? – Raptor Apr 24 '13 at 7:34
  • It does not work also... – Zhi Lu Apr 24 '13 at 7:36
  • 2
    isn't --bare and --shared? – gipi Apr 24 '13 at 7:41
  • 1
    If it's on a removable hard disk, it might be a FAT partition which doesn't support group permissions. – John Szakmeister Apr 24 '13 at 8:45
  • 1
    @jszakmeister It's FAT partition. Can I please ask is there any solution to this problem? Git on FAT partition works in Windows and Mac OS X...Thanks! – Zhi Lu Apr 24 '13 at 13:29

You probably must be the superuser otherwise you can't change the group permissions.

On ubuntu try

$ sudo git --bare init --shared /path/to/repo
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.