Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to create a local git repository using a mounted linux drive (via SSH via ExpandDrive) from my mac using GitBox, however when I attempt to make a commit I continually receive this error.

fatal: error when closing sha1 file: Permission denied

I am not exactly sure how to fix this. From other searches, I have attempted to change the .git permissions and also tried using another Git GUI (Tower) but to no avail.

share|improve this question

migrated from stackoverflow.com Mar 25 '13 at 8:23

This question came from our site for professional and enthusiast programmers.

    
have you tried just command line approach using git init? –  mvp Mar 25 '13 at 6:56
    
Did you tried a git repo-config core.sharedRepository true on the repo? –  VonC Mar 25 '13 at 7:41

1 Answer 1

Check permissions on the .git directory inside your repository, and what is inside. The data itself is in the .git/objects directory. An ls -lR .git should tell. It could be a very long list...

As it is some sort of external drive, it might be that the users don't match, or it is some filesystem that doesn't handle the file names used by git (unlikely, but I'd check for this too). Or it doesn't handle the permissions git it trying to give its files. I don't know how MacOS reacts on trying to close a file when there is no space, that also might explain the message. Or you might have run out of inodes. Can you create files there at all?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.