3

When I use git to clone something like https://github.com/rails/rails I see permissions like the following (bash in OS X 10.10). The files and directories have the permissions I expect.

Rails repo permissions

But when I pull from a private github repo (owned by my company) I see permissions like the following. I don't understand why the permissions are restricted. Are those the permissions the last developer was using when he/she pushed to Github? (they are no longer with the company)

I can't access anything with my local webserver without changing the permissions on every file and directory. Do I have to change the permissions and then commit those changes? How are permissions normally handled?

enter image description here

RobertJoseph
  • 7,968
  • 12
  • 68
  • 113
  • 1
    make git ignore file permission http://stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-file-mode-chmod-changes – bitoiu Aug 05 '15 at 23:07
  • 1
    In both situations, are you cloning from the same user account on your local system? Git doesn't *store* file permissions in the repository (other than "is this file executable"), so this would be really puzzling *if* both results are from the same account. – larsks Aug 05 '15 at 23:33
  • Yes, I am cloning when logged in as the same user. I am going to follow @bitoiu's advice and "fix" the local permissions (via `chmod`) and then add `filemode = false` to the repo's `.git/config` file. – RobertJoseph Aug 06 '15 at 10:37

1 Answers1

0

May be to check umask setting on private server? First correct permissions on private server and set umask value to 0022.

Mifeet
  • 12,949
  • 5
  • 60
  • 108
Murad Tagirov
  • 776
  • 6
  • 10