How to fix git cannot be opened because the developer cannot be verified in Git

GitBEGINNERLOWUpdated Dec 2, 2025ยท 212 views

This macOS Gatekeeper error prevents Git from running because Apple cannot verify the developer's identity. The fix involves either approving the app in Security settings, removing the quarantine attribute, or reinstalling Git from a trusted source like Homebrew.

Quick fix

Fixes git cannot be opened because the developer cannot be verified

open "x-apple.systempreferences:com.apple.preference.security"
  1. Allow Git in Security & Privacy settings
  2. Remove the quarantine attribute via Terminal
  3. Reinstall Git using Homebrew
  4. Use Xcode Command Line Tools Git
git โ€” error
open "x-apple.systempreferences:com.apple.preference.security"
git cannot be opened because the developer cannot be verified

What this error means

The "git cannot be opened because the developer cannot be verified" error is a macOS security feature called Gatekeeper. It blocks applications downloaded from outside the Mac App Store that haven't been notarized by Apple. When you download Git from third-party sources (such as git-scm.com or certain package managers), macOS may quarantine the executable and prevent it from running. This error commonly occurs in these scenarios: - **Third-party Git installations** - Git downloaded from websites other than Apple or installed via non-standard methods - **Homebrew-installed Git on new Macs** - Sometimes after macOS updates or on fresh installations - **Git GUI applications** - Third-party Git clients that aren't notarized - **Command-line Git installed manually** - Compiling Git from source or using unofficial packages - **After macOS upgrades** - Security policies may change and previously allowed apps get blocked Gatekeeper is designed to protect your Mac from malware by requiring applications to be signed and notarized by Apple. However, many legitimate developer tools including Git distributions may not have Apple's notarization, triggering this warning.

Typical symptoms

  • Running 'git' in Terminal shows a popup saying the developer cannot be verified
  • Git commands fail to execute with no output in Terminal
  • A dialog appears asking to move git to Trash or Cancel
  • Git works after clicking 'Cancel' but the popup reappears each time
  • Error occurs after installing Git from a third-party website
  • Git stopped working after a macOS update
  • The same Git installation works on other Macs but not this one

Common causes

  1. Git was downloaded from a source not notarized by Apple
  2. macOS quarantine attribute was applied when downloading Git
  3. Recent macOS update enabled stricter Gatekeeper policies
  4. Git binary was compiled from source without code signing
  5. Third-party Git installer is not recognized by Apple's security system
  6. Security & Privacy settings are configured to only allow App Store apps
  7. Git application bundle is corrupted or incomplete

How to fix "git cannot be opened because the developer cannot be verified"

1Allow Git in Security & Privacy settings

The easiest fix is to approve Git through macOS Security settings:

1. When you see the "developer cannot be verified" dialog, click Cancel (not "Move to Trash")

2. Open System Settings (or System Preferences on older macOS):

bash
open "x-apple.systempreferences:com.apple.preference.security"

3. Go to Privacy & Security

4. Scroll down to the Security section. You should see a message saying:
> "git" was blocked from use because it is not from an identified developer.

5. Click Open Anyway

6. Enter your administrator password when prompted

7. A new dialog will appear - click Open to confirm

Git should now work without the warning. This approval is remembered permanently.

2Remove the quarantine attribute via Terminal

macOS adds a quarantine flag to downloaded files. Removing it allows Git to run:

bash
# First, find where Git is installed
which git
# Common locations:
# /usr/local/bin/git
# /opt/homebrew/bin/git (Apple Silicon Macs)
# /usr/bin/git (Xcode Command Line Tools)

# Remove quarantine attribute (replace path with your git location)
sudo xattr -rd com.apple.quarantine /usr/local/bin/git

# If Git is a complete application bundle
sudo xattr -rd com.apple.quarantine /Applications/Git.app

# For Homebrew installations on Apple Silicon
sudo xattr -rd com.apple.quarantine /opt/homebrew/bin/git

The -r flag applies recursively to all files in a directory, and -d deletes the attribute. After running this command, Git should execute without the Gatekeeper warning.

3Reinstall Git using Homebrew

The most reliable solution is to install Git via Homebrew, which properly signs and handles macOS security:

bash
# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Remove any existing problematic Git installation
# (Skip if Git is the Xcode version at /usr/bin/git)
sudo rm -rf /usr/local/git

# Install Git via Homebrew
brew install git

# Verify installation
git --version
which git

Homebrew-installed Git is typically located at:
- Intel Macs: /usr/local/bin/git
- Apple Silicon Macs: /opt/homebrew/bin/git

Make sure Homebrew's bin directory is in your PATH (Homebrew will provide instructions during installation).

4Use Xcode Command Line Tools Git

Apple provides a signed and notarized version of Git through Xcode Command Line Tools:

bash
# Install Xcode Command Line Tools (includes Git)
xcode-select --install

# A dialog will appear - click "Install" and accept the license

# After installation, verify Git is available
git --version
# Should show something like: git version 2.39.2 (Apple Git-143)

# Check the path
which git
# Should show: /usr/bin/git

The Apple-provided Git at /usr/bin/git is always trusted by Gatekeeper. While it may not be the absolute latest version, it's reliable and requires no additional security approvals.

5Right-click to open (for Git GUI apps)

If you're using a Git GUI application (like GitKraken, Sourcetree, or Fork), use the right-click method:

1. Find the Git application in Finder (usually in /Applications)

2. Control-click (or right-click) on the application

3. Select Open from the context menu

4. In the dialog that appears, click Open

This bypasses Gatekeeper for that specific app. Unlike double-clicking, the right-click method gives you the option to override the security check.

For command-line Git that's part of an app bundle:

bash
# Control-click method via Terminal
open /Applications/YourGitApp.app
# Then click Open in the dialog
6Check and modify Gatekeeper settings

You can adjust which apps macOS allows:

bash
# Check current Gatekeeper status
spctl --status
# Output: assessments enabled (Gatekeeper is active)

# View security assessment for Git
spctl -a -v /usr/local/bin/git

Modify allowed sources in System Settings:
1. Open System Settings > Privacy & Security
2. Under "Allow applications downloaded from:", select:
- App Store and identified developers (recommended)
- App Store (most restrictive - may cause Git issues)

Note: The "Anywhere" option that existed in older macOS versions is no longer available in the GUI. You can enable it via Terminal, but this significantly reduces security:

bash
# NOT RECOMMENDED - disables Gatekeeper entirely
sudo spctl --master-disable

# To re-enable Gatekeeper
sudo spctl --master-enable

Only disable Gatekeeper if absolutely necessary and re-enable it immediately after.

Advanced notes

Understanding macOS Gatekeeper:
Gatekeeper is macOS's first line of defense against malware. It checks three things:
1. Code signing - Is the app signed by a registered Apple developer?
2. Notarization - Has Apple scanned the app for malware?
3. Quarantine flag - Was the file downloaded from the internet?

Git distributed via git-scm.com is code-signed but may not be notarized, triggering the warning.

Quarantine Extended Attribute:

bash
# View all extended attributes on the Git binary
xattr -l /usr/local/bin/git

# Example quarantine attribute value:
# com.apple.quarantine: 0083;5f3b8c7d;Chrome;

# List all quarantined files in a directory
find /usr/local/bin -xattr com.apple.quarantine 2>/dev/null

Code Signing Verification:

bash
# Check if Git is properly signed
codesign -dv --verbose=4 /usr/local/bin/git

# Verify signature is valid
codesign --verify --verbose /usr/local/bin/git

# For Homebrew Git, check the certificate
codesign -dvvv /opt/homebrew/bin/git 2>&1 | grep Authority

Enterprise/MDM Considerations:
In managed environments, your IT department may:
- Deploy Git through an MDM solution with proper signing
- Whitelist specific Git versions in Gatekeeper
- Disable certain security bypasses

Contact your IT department before disabling Gatekeeper on company machines.

Apple Silicon (M1/M2/M3) Specific Notes:
On Apple Silicon Macs:
- Homebrew installs to /opt/homebrew instead of /usr/local
- Rosetta 2 may be required for Intel-compiled Git: softwareupdate --install-rosetta
- Native ARM Git from Homebrew is preferred for performance

Persistent Issues After macOS Updates:
Major macOS updates sometimes reset security approvals:

bash
# Re-approve Git after macOS update
sudo xattr -rd com.apple.quarantine $(which git)

# Or reinstall via Homebrew to get fresh signatures
brew reinstall git

Frequently asked questions

What does "git cannot be opened because the developer cannot be verified" mean?
The "git cannot be opened because the developer cannot be verified" error is a macOS security feature called Gatekeeper. It blocks applications downloaded from outside the Mac App Store that haven't been notarized by Apple. com or certain package managers), macOS may quarantine the executable and prevent it from running.
How do I fix "git cannot be opened because the developer cannot be verified"?
This macOS Gatekeeper error prevents Git from running because Apple cannot verify the developer's identity. The fix involves either approving the app in Security settings, removing the quarantine attribute, or reinstalling Git from a trusted source like Homebrew.
What causes "git cannot be opened because the developer cannot be verified"?
Git was downloaded from a source not notarized by Apple macOS quarantine attribute was applied when downloading Git Recent macOS update enabled stricter Gatekeeper policies
Is the "git cannot be opened because the developer cannot be verified" error serious?
It is a low-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading