How to fix warning: unable to create symbolic link: Permission denied in Git

GitINTERMEDIATELOWUpdated Dec 6, 2025· 360 views

This warning occurs when Git tries to create a symbolic link on Windows but lacks the required permissions. By default, Windows restricts symlink creation to administrators. The fix involves either enabling Developer Mode, running Git with elevated privileges, or configuring Git to handle symlinks differently.

Quick fix

Fixes warning: unable to create symbolic link: Permission denied

# Enable Developer Mode via registry
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  1. Enable Windows Developer Mode
  2. Configure Git to use symbolic links
  3. Reinstall Git with symlink support
  4. Run Git as Administrator
git — error
# Enable Developer Mode via registry
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
warning: unable to create symbolic link: Permission denied

What this error means

The "unable to create symbolic link: Permission denied" warning indicates that Git is attempting to check out a repository containing symbolic links (symlinks), but Windows is blocking their creation due to security restrictions. On Unix-like systems (Linux, macOS), symbolic links are a common filesystem feature that any user can create. However, Windows historically restricted symlink creation to administrators as a security measure, because symlinks can be used in certain privilege escalation attacks. This warning typically appears when: - **Cloning a repository** that contains symbolic links created on Linux or macOS - **Checking out a branch** that introduces new symlinks - **Pulling changes** that add symlinks to the repository - **Running Git on Windows without proper permissions** or configuration When Git cannot create a symlink, it falls back to creating a regular file containing the target path. This may cause issues if your project relies on symlinks for shared configurations, build systems, or directory structures.

Typical symptoms

  • Warning messages appear during git clone, checkout, or pull operations
  • Files that should be symlinks are created as regular text files containing a path
  • Build systems or scripts fail because expected symlinks are missing
  • The repository works on Linux/macOS but behaves differently on Windows
  • Directory structures appear broken or duplicated
  • Relative paths in configuration files don't resolve correctly

Common causes

  1. Windows restricts symbolic link creation to users with the SeCreateSymbolicLinkPrivilege
  2. Developer Mode is not enabled on Windows 10/11
  3. Git was installed without the 'Enable symbolic links' option
  4. Git Bash or command prompt is not running as Administrator
  5. The core.symlinks Git configuration is set to false
  6. Group Policy prevents users from creating symbolic links
  7. Antivirus or security software is blocking symlink creation
  8. NTFS permissions on the target directory prevent symlink creation

How to fix "warning: unable to create symbolic link: Permission denied"

1Enable Windows Developer Mode

Windows 10 version 1703 and later allows unprivileged symlink creation when Developer Mode is enabled. This is the simplest and most persistent solution.

Steps to enable Developer Mode:

1. Open Settings (Windows key + I)
2. Navigate to Update & Security (Windows 10) or Privacy & Security (Windows 11)
3. Click For developers
4. Toggle Developer Mode to On
5. Confirm the prompt if asked

Using PowerShell (requires Admin):

powershell
# Enable Developer Mode via registry
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

After enabling Developer Mode, restart your terminal and try cloning or checking out again.

Verify it's enabled:

powershell
# Check Developer Mode status
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /v AllowDevelopmentWithoutDevLicense

If the value is 0x1, Developer Mode is enabled.

2Configure Git to use symbolic links

Git on Windows may have symlink support disabled by default. You need to ensure it's enabled in your Git configuration.

Check current symlink setting:

bash
git config --global core.symlinks

If it returns false or nothing, enable it:

Enable symlinks globally:

bash
git config --global core.symlinks true

Enable symlinks for a specific repository:

bash
cd /path/to/repo
git config core.symlinks true

Important: Changing this setting doesn't automatically fix existing files. You'll need to re-checkout the affected files:

bash
# Re-checkout all files to apply symlink setting
git checkout -- .

# Or for a clean start
git reset --hard HEAD

Verify symlinks were created:

bash
# List files and their types (symlinks show with 'l' prefix)
ls -la

# Or check a specific file
file path/to/suspected/symlink
3Reinstall Git with symlink support

If you installed Git for Windows without symlink support, you may need to reinstall it with the correct option enabled.

During Git installation:

1. Download Git for Windows from https://git-scm.com/download/win
2. Run the installer
3. When you reach the Configuring extra options screen, check the box:
"Enable symbolic links"
4. Complete the installation

Using winget:

powershell
# Uninstall existing Git
winget uninstall Git.Git

# Reinstall (you'll still need to check the symlinks option in the installer)
winget install Git.Git

Using Chocolatey:

powershell
# Install with symlink support
choco install git --params "/GitAndUnixToolsOnPath /NoShellIntegration /SChannel /WindowsTerminal /Symlinks"

After reinstalling, restart your terminal and run:

bash
git config --global core.symlinks

This should now return true.

4Run Git as Administrator

If you can't enable Developer Mode (e.g., on a managed corporate machine), you can run Git with elevated privileges to create symlinks.

Running Git Bash as Administrator:

1. Right-click on Git Bash in the Start menu
2. Select Run as administrator
3. Click Yes on the UAC prompt
4. Navigate to your repository and clone/checkout

Running Command Prompt as Administrator:

1. Press Windows key + X
2. Select Terminal (Admin) or Command Prompt (Admin)
3. Run your Git commands from there

Running VS Code as Administrator:

1. Right-click on VS Code
2. Select Run as administrator
3. Open your repository folder

Note: Running as Administrator is not a good long-term solution because:
- It's inconvenient for daily work
- It poses security risks
- Some tools may behave unexpectedly with elevated privileges

Use this as a temporary workaround while you implement a permanent solution like Developer Mode.

5Grant symlink permissions via Local Security Policy

On Windows Pro, Enterprise, or Server editions, you can grant your user account the right to create symbolic links without Administrator privileges.

Using Local Security Policy (secpol.msc):

1. Press Windows key + R, type secpol.msc, and press Enter
2. Navigate to: Local Policies > User Rights Assignment
3. Double-click Create symbolic links
4. Click Add User or Group
5. Add your username or a group you belong to
6. Click OK and close the windows
7. Log out and log back in for changes to take effect

Using PowerShell (requires Admin):

powershell
# Add current user to SeCreateSymbolicLinkPrivilege
$identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object System.Security.Principal.WindowsPrincipal($identity)
$user = $identity.Name

# This requires the Carbon PowerShell module
Install-Module Carbon -Force
Import-Module Carbon
Grant-CPrivilege -Identity $user -Privilege SeCreateSymbolicLinkPrivilege

Using ntrights.exe (from Windows Resource Kit):

cmd
ntrights +r SeCreateSymbolicLinkPrivilege -u YourUsername

Note: On Windows Home edition, secpol.msc is not available. Use Developer Mode instead.

6Re-clone the repository after fixing permissions

If you fixed the permissions after an initial clone, the repository already contains regular files instead of symlinks. You need to re-clone or reset to get proper symlinks.

Option 1: Re-clone the repository

bash
# Move or delete the old clone
mv repo repo-old
# or: rm -rf repo

# Clone fresh with symlinks enabled
git clone https://github.com/user/repo.git

Option 2: Reset existing repository

bash
cd repo

# Ensure symlinks are enabled
git config core.symlinks true

# Remove all tracked files and re-checkout
git checkout -- .

# If that doesn't work, do a hard reset
git reset --hard HEAD

Option 3: Remove and restore specific symlinks

bash
# Remove the fake symlink file
rm path/to/symlink

# Restore it from Git
git checkout -- path/to/symlink

# Verify it's now a real symlink
ls -la path/to/symlink

Verify symlinks are working:

bash
# On Windows Git Bash, symlinks show as 'lrwxrwxrwx'
ls -la

# Check symlink target
readlink path/to/symlink
7Use junctions as an alternative (directories only)

If you cannot enable symlink support and only need to link directories, NTFS junctions are an alternative that doesn't require special permissions.

Note: This is a workaround, not a Git-native solution. Junctions only work for directories, not files.

Creating a junction manually:

cmd
mklink /J "link-name" "target-directory"

PowerShell:

powershell
New-Item -ItemType Junction -Path "link-name" -Target "target-directory"

Limitations of junctions:
- Only work for directories, not files
- Must point to absolute paths (relative paths converted at creation)
- Only work on NTFS filesystems
- Git doesn't natively understand junctions

For projects you control:

If you maintain the repository, consider whether symlinks are truly necessary on Windows, or if you can:
- Use relative paths in configuration files
- Create Windows-specific setup scripts
- Document Windows setup requirements in README

Advanced notes

Understanding Windows Symlink Security:

Historically, Windows restricted symbolic link creation because symlinks can be exploited in privilege escalation attacks. A malicious user could create a symlink pointing to a sensitive system file, then trick an elevated process into following the link and modifying the target.

Windows Vista introduced symlinks with this restriction. The SeCreateSymbolicLinkPrivilege privilege was required, typically only granted to Administrators.

Windows 10 version 1703 (Creators Update) relaxed this with Developer Mode, recognizing that developers frequently need symlinks and the security risk is manageable on development machines.

Git's Symlink Handling:

When Git stores a symlink:
1. It records the file mode as 120000 (symlink)
2. The file content is the target path (relative or absolute)
3. On checkout, Git reads the mode and creates either a symlink or regular file

When core.symlinks is false:
1. Git creates a regular file instead of a symlink
2. The file contains the symlink target as plain text
3. This allows checkout to succeed but breaks symlink functionality

WSL Interoperability:

If you use Windows Subsystem for Linux (WSL):
- WSL can create symlinks that Windows understands
- Git in WSL handles symlinks natively
- Symlinks created in WSL are visible as symlinks in Windows (with Developer Mode)

Consider using Git from within WSL for repositories with many symlinks.

Group Policy Restrictions:

In corporate environments, Group Policy may override local settings:

bash
Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Create symbolic links

Contact your IT department if you need symlink permissions but can't enable them yourself.

FAT32 and exFAT Limitations:

Symlinks only work on NTFS. If your repository is on a FAT32 or exFAT drive (common for USB drives), symlinks cannot be created regardless of permissions.

Cross-Platform Repositories:

For repositories shared between Windows and Unix systems:

1. Consider if symlinks are necessary - Many uses can be replaced with build scripts or configuration
2. Document Windows requirements - Include setup instructions in README
3. Use .gitattributes - You can specify how Git should handle specific files:

bash
# Force specific files to be treated as symlinks
   some/symlink symlink=true

4. CI/CD considerations - Ensure your Windows build agents have symlink support

Checking Symlink Status:

bash
# In Git Bash, check if symlinks are being used
git ls-files -s | grep '^12'
# Mode 120000 indicates symlinks

# Check a specific file's mode
git ls-files -s path/to/file

Troubleshooting Checklist:

1. Is Developer Mode enabled? (Settings > For developers)
2. Is core.symlinks true? (git config core.symlinks)
3. Is the filesystem NTFS? (not FAT32/exFAT)
4. Is antivirus interfering? (check exclusions)
5. Are there Group Policy restrictions? (gpedit.msc)
6. Was Git installed with symlink support? (reinstall if unsure)

Frequently asked questions

What does "warning: unable to create symbolic link: Permission denied" mean?
The "unable to create symbolic link: Permission denied" warning indicates that Git is attempting to check out a repository containing symbolic links (symlinks), but Windows is blocking their creation due to security restrictions. On Unix-like systems (Linux, macOS), symbolic links are a common filesystem feature that any user can create. However, Windows historically restricted symlink creation to administrators as a security measure, because symlinks can be used in certain privilege escalation attacks.
How do I fix "warning: unable to create symbolic link: Permission denied"?
This warning occurs when Git tries to create a symbolic link on Windows but lacks the required permissions. By default, Windows restricts symlink creation to administrators. The fix involves either enabling Developer Mode, running Git with elevated privileges, or configuring Git to handle symlinks differently.
What causes "warning: unable to create symbolic link: Permission denied"?
Windows restricts symbolic link creation to users with the SeCreateSymbolicLinkPrivilege Developer Mode is not enabled on Windows 10/11 Git was installed without the 'Enable symbolic links' option
Is the "warning: unable to create symbolic link: Permission denied" error serious?
It is a low-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading