-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCM 2.6 fails to install on macOS Sonoma 14.7 #1717
Comments
Hmm.. I just tried this on macOS 14.7 (build 23H124) with GCM 2.6.0 and got a successful install. mjcheetham@chronos ~ % brew install --cask git-credential-manager
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
==> Updated Homebrew from 3f11462c14 to 4671af4bb9.
No changes to formulae or casks.
==> Downloading https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.0/gcm-osx-arm64-2.6.0.pkg
Already downloaded: /Users/mjcheetham/Library/Caches/Homebrew/downloads/4666f1223e9be016ab087da40f8fb50551654ddc553faeb68ca4635dd23021d3--gcm-osx-arm64-2.6.0.pkg
==> Installing Cask git-credential-manager
==> Running installer for git-credential-manager with sudo; the password may be necessary.
Password:
installer: Package name is Git Credential Manager
installer: Installing at base path /
installer: The install was successful.
🍺 git-credential-manager was successfully installed! Did you have any previous versions of GCM installed prior to this? What happens if you forcibly uninstall any previous versions, or attempted/incomplete installs and then reinstall? brew update
brew uninstall --cask --force git-credential-manager
brew install --cask git-credential-manager |
Hi, and thanks for the quick response.
|
Can you also try running the following commands and reporting back with the output please? ls /usr/local/share/gcm-core
ls -l /usr/local/bin | grep git-credential-manager Have you also tried installing via the pkg file rather than via Homebrew? Do you have the same issue (installation failing)? |
Hi @mjcheetham.
Yes, same issue |
Works for me too.
|
@javier-garcia-sonarsource can you try running the following command first before retrying installation? sudo xcodebuild -license accept It's possible that you may need to accept the Xcode license agreement to the installation script to complete successfully. The script calls in to Homebrew, which itself calls some of the Xcode CLI tools. We have seen this issue in other versions: #1708 |
Sure.
|
How about |
I ran
|
Hmm.. how strange.. the failure is coming from the postinstall script that is run after install. The commands/programs that are run are:
Could you try running the following and see if any of them fail? /usr/bin/which brew
/bin/ln
mkdir -p /tmp/test123
sudo uname
brew --version |
Hi, all the commands worked fine:
|
ls -l /bin/bash ? Short of this, I'll need to update the postinstall script to add extra logging and try and find where the error is occuring. In the meantime, you can workaround the installation failure by manually extracting the tarball for macOS: # Download
curl -L -o gcm-osx-arm64-2.6.0.tar.gz https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.0/gcm-osx-arm64-2.6.0.tar.gz
# Create directory and extract
sudo mkdir -p /usr/local/share/gcm-core/
sudo tar -xzf gcm-osx-arm64-2.6.0.tar.gz -C /usr/local/share/gcm-core/
sudo chmod +x /usr/local/share/gcm-core/git-credential-manager
sudo chmod +x /usr/local/share/gcm-core/uninstall.sh
# Create symlink
sudo /bin/ln -Fs /usr/local/share/gcm-core/git-credential-manager /usr/local/bin/git-credential-manager
# Configure GCM with Git
/usr/local/bin/git-credential-manager configure |
|
I could install it following your commands. |
Yes, the root user/sudo is required to install via the pkg or Homebrew (which uses the pkg underneath) in order to install to the If you want to install GCM without root access, you'll just need to extract the tar.gz file to somewhere you have write access to, chmod to set the execute bits on the |
Same output on my machine. |
This is expected output when no file is specified. |
So maybe we could redirect |
I too am having this exact same issue with both homebrew and package install. |
One of my students is also able to reproduce this, running Sonoma 14.5 |
After much digging, I was able to resolve this on my student's system. Turns out SIP was disabled for some unknown reason; re-enabling fixed this and another seemingly unconnected issue with her JDK installation. To check its status on your machine, run |
What is SIP, and how did you enable it? |
@Genyus ☝️ |
System Integrity Protection (SIP) is a macOS security mechanism that enforces kernel-level restrictions on the root user and restricts modification of protected system directories and processes, ensuring only Apple-signed code can alter critical system files. |
@dscho I provided the steps to enable it in the comment you replied to. Run |
After some testing on my own machine (M1 Max running Sequoia 15.1), the SIP thing might be a red herring. I uninstalled GCM, then disabled SIP and attempted to reinstall. I was able to reproduce the same error message, so at that point, I thought I had confirmed it as a cause — but after re-enabling SIP, the installer continued to fail. I attempted the manual installation instructions provided by @mjcheetham and received "Permission denied" errors on my ~/.gitconfig file when executing the I checked the permissions and found root had ownership, along with 600 permissions applied. I ran Without better logging, it's probably impossible to know whether everyone encountering this has the same root cause, but .gitconfig permissions may be at least one investigation target. |
GCM 2.6 installation fails using Homebrew command
brew install --cask git-credential-manager
Error message:
The text was updated successfully, but these errors were encountered: