0

I can't do git pull due to a permission error:

alex$ sudo chown alex .git

alex$ ls -ald .git
drwxr-xr-x  17 alex  staff  578 Jun 10 10:40 .git

alex$ git pull origin
error: cannot open .git/FETCH_HEAD: Permission denied

alex$ ls -l .git/FETCH_HEAD
-r-xr--r--  1 alex  staff  322 Jun  8 11:35 .git/FETCH_HEAD

What's up with this?

P.S. Git remote -v and the ssh keys are ok.

アレックス
  • 24,309
  • 37
  • 129
  • 229
  • for some reason you don have the write access to some content of .git. I assume `chmod -R +w .git` should do (the options order may differ, osx shell is quite strict) – njzk2 Jun 10 '14 at 02:49
  • http://stackoverflow.com/questions/13195814/trying-to-git-pull-with-error-cannot-open-git-fetch-head-permission-denied may help – James King Jun 10 '14 at 02:49
  • @njzk2, yes, it did the trick. – アレックス Jun 10 '14 at 03:21

0 Answers0