Permission denied when creating symbolic links in git

13,054

Solution 1

You might be running into a basic incompatibility of ln on windows platforms (in this case within MINGW-MSYS). You can replace ln with a version that "does the right thing" on Windows; have a look at this:

Git Bash Shell fails to create symbolic links

Solution 2

I had this issue on Windows and I did a couple of steps to resolve this :

  1. Enabled core.symlinks by modifying git config

    git config --edit

  2. Opened Git Bash as an Administrator and executed the git checkout command

This worked for me, hope it helps someone.

Share:
13,054
marc_s
Author by

marc_s

Updated on June 09, 2022

Comments

  • marc_s
    marc_s almost 2 years

    there is a similar question, but the difference here is that I am working on Windows. I am running git on Windows (working in git bash tool) and I have successefully cloned my forked repository. Now I need to make symbolic link and it gives me Permission denied. I can make new dir for example in .git folder and I have also set chmod /R 777 for .git directory, so it seems I have permissions.

    I tried to run: rm -rf hooks and then ln -s ../git_hooks hooks.