you need to set your proxy and then issue the heroku login command
Source : https://devcenter.heroku.com/articles/using-the-cli#using-an-http-proxy
Using an HTTP proxy If you’re behind a firewall that requires use of a
proxy to connect with external HTTP/HTTPS services, you can set the
HTTP_PROXY or HTTPS_PROXY environment variables in your local
developer environment, before running the heroku command. For example,
on a Unix system you could do something like this:
$ export HTTP_PROXY=http://proxy.server.com:portnumber
or
$ export HTTPS_PROXY=https://proxy.server.com:portnumber
$ heroku login
On a
Windows machine, either set it in the System Properties/Environment
Variables, or do it from the terminal:
> set HTTP_PROXY=http://proxy.server.com:portnumber
or
> set HTTPS_PROXY=https://proxy.server.com:portnumber
> heroku login