Can't login to Heroku using CLI, getting "IP address mismatch"

Issue

I tried to log in to Heroku by running the Heroku CLI command

heroku login

The browser window shows "IP address mismatch" and I cannot proceed further.

Resolution

As described in our changelog at https://devcenter.heroku.com/changelog-items/1873, the platform requires that the IP address of both the CLI and web browser align.

This means that you will need to have the same proxy setup for both the CLI and the browser used to authenticate. You'll need to configure the web proxy in the CLI with the https_proxy option. You may need to restart your browser once these configurations are made for the changes to take effect.

"IP address mismatch" is a known issue when using iCloud Private Relay on a Mac and disabling it would resolve the error.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support