git clone is giving me an error on Mac

Hi.

So, I created a repository at github.com. I uploaded some files there. I am now trying to clone it to my Mac. I have git v. 2.22.0 on my Mac. I type:

>> git clone https://…

And I get this error: 

Cloning into ‘hello-world’…

error: chmod on /Volumes/cce_u1/hill/dfh/github/hello-world/.git/config.lock failed: Permission denied

fatal: could not set ‘core.filemode’ to ‘false’

I try this:

>>git config --global core.fileMode false

And then repeat the clone attempt, but nothing. Any ideas? When I ssh: in to my linux machine and try to clone there, it works. Just not on the Mac.

1 Like

The core.fileMode configuration variable has to do with specifically the executable bit of files within the repository, not files in Git’s database (in other words, inside the .git directory). So changing the value there would have no effect on whatever problem you’re experiencing.

Were you cloning the repository into an already-existing directory? Can you try cloning someplace brand new? Something like:

  1. Execute mkdir ~/test-the-clone-wars
  2. Execute cd ~/test-the-clone-wars
  3. Execute git clone [repo url]

Let us know!

1 Like