Heroku doesn't support Apple Git-146

TL;DR: If after Sept/Oct 2024 you’re getting an Apple git error when trying to push to Heroku, you might not have to follow the advice to get a newer git from some other source (like Homebrew) - just update “Command Line Tools for Xcode” from your Mac System Settings.

Some time around the second half of August 2024 we started getting an error when attempting to connect to Heroku from certain Macs.

remote: !    Heroku does not support Git client version git/2.39.3 (Apple Git-146).
remote: !    Please upgrade to the latest Git version.
remote: !    For more information, please see https://help.heroku.com/GJ1XRFT5/fatal-error-pushing-to-heroku-on-macos-with-git-2-39-3-apple-git-146

It wasn’t affecting my MacBook Pro, but a colleague and I were both getting the error trying to push from our desktop Macs. The url in the message went to a page suggesting we install git some other way. Meanwhile my old MacBook pro reported:

git version 2.32.0 (Apple Git-132)

And that could push to Heroku no problem. The desktop Macs that weren’t playing nice reported:

git version 2.39.3 (Apple Git-146)

So it seemed like it was a quite specific version (or perhaps range of versions) that weren’t being supported by Heroku. Did the engineering team at Heroku notice some kind of scary behaviour coming from Apple Git-146 clients, and block it around Aug 2024?

The received wisdom online from other developers was to use Homebrew or some other method to install latest git. I’ve kind of fallen out of love with Homebrew, and I didn’t desperately need to use Heroku the day this happened, so I held off and sulked a little bit - it surprised me that Heroku and Mac weren’t playing nice together out of the box.

I only just came back to it today (24 Oct 2024). I was toying with the idea of installing git from the official git homepage when I thought I’d check for updates on the Mac. Sure enough, this update must’ve come out in the last couple of weeks:

MacOS Available Updates October 2024

I installed the “Command Line Tools for Xcode” update and as if by magic, the problem was fixed. Git now reports…

git version 2.39.5 (Apple Git-154)

…and my Mac is pushing and pulling happily with Heroku again.

Valid HTML This page was handcrafted in Brighton by Codeface