How to Install the Heroku CLI
November 18, 2022Disponible en español
Heroku is a cloud application platform that enables developers to build, run, and operate applications entirely in the cloud. Unlike GitHub pages, which only allows you to deploy static sites with HTML pages, Heroku allows you to deploy a server.js file that will run the Node.js process. You’ll use the Heroku CLI to deploy apps to Heroku without leaving the command line.
Important You should have received an email providing access to the GitHub Student Developer Pack. This will give you $13 in free Heroku credits per month. Please ensure that you've accepted that invitation before you sign up for Heroku and install the CLI. Once you have access to the GitHub Student Developer Pack, follow the instructions below to do the following:
Sign up for a Heroku account.
Install the Heroku CLI.
Connect your Heroku account to your GitHub account so that you receive the benefits of the GitHub Student Developer Pack.
To install the Heroku CLI on your machine, follow the instructions for your operating system below. Some of the images and versions mentioned below may slightly different from the Heroku site, but the general instruction is the same.
Before you begin, sign up for a free Heroku account.
Install the Heroku CLI on Windows
To install the Heroku CLI on Windows, download the 64-bit installer for Windows.
Open the installer on your machine and follow the prompts to complete the installation. Once the installation is complete, open Git Bash.
To verify that the Heroku CLI was installed, type heroku --version into the command line. You should get a message that looks like the following, but note that the number may be different depending on your version of the CLI:
heroku/7.42.6 win32-x64 node-v12.16.2
After you confirm that the Heroku CLI was installed correctly, type heroku login into the command line. You'll be prompted to enter any key to go to the web browser to complete login. The CLI will then log you in automatically.
Install the Heroku CLI on macOS
To install the Heroku CLI on macOS, first ensure that you have Homebrew installed on your machine.
Once you've confirmed that you have Homebrew installed, open your Terminal and enter the following command:
brew tap heroku/brew && brew install heroku
To verify that the Heroku CLI was installed, type heroku --version into the command line. You should get a message that looks like the following, but note that the number may be different depending on your version of the CLI:
heroku/7.42.5 darwin-x64 node-v12.16.2
After you confirm that the Heroku CLI was installed correctly, type heroku login into the command line. You'll be prompted to enter any key to go to the web browser to complete login. The CLI will then log you in automatically.
Connect your Heroku Account to GitHub
One of the benefits you receive in this boot camp is 12 months of access to the GitHub Student Developer Pack. By now, you should have received an email with a link providing access to the Student Developer Pack. This benefit includes $13 in free Heroku credits per month, which will allow you to deploy server-side applications over the rest of the course.
Important Ensure that you've accepted the GitHub Student Developer Pack invitation before proceeding.
After you've ensured that you've accepted the GitHub Student Developer Pack invitation, make sure that you're signed in to your GitHub account. You should also ensure that you're signed in to the Heroku account you created above.
Once you're signed in to both accounts, go to the GitHub Education Student Developer Pack offers page. Scroll down (or search the page) until you find the card with the Heroku logo. The first heading should display the text "About Heroku," as shown in the following image:
Next, click on the link that says "Get access by connecting your GitHub account on Heroku."
This will take you to a page called "Heroku for GitHub Students." Scroll down and click on the button with the text "Get the student offer," as shown in the following image:
You'll then be taken to a page called "3 Easy Steps to Request Your Free Hobby Dyno". To complete step one, simply click on the button with the text "Verify with GitHub", as shown in the following image:
Note You should already be logged in to Heroku, but if you aren't, you'll need to log in first to see the page called "3 Easy Steps to Request Your Free Hobby Dyno.".
You'll be redirected to GitHub with the prompt "Authorize Heroku for GitHub Students." Click the green "Authorize heroku" button to connect your GitHub account with Heroku:
With Step 1 complete, you can move on to Step 2: "Verify your Heroku billing information." You will need to provide a credit card in the billing section of your account. Rest assured that you won't be charged anything as long as you properly manage your deployed applications. We will go over how to spin down deployed applications in subsequent blogs to both help avoid incurring charges as well as preserve your application code.
Don't click the purple "Verify my billing information" button yet! Click the link "Add a credit or debit card to your account now..." and a new tab will open that will display account's billing page:
Within the "Manage Account" page on Heroku, click "Add a credit card" and enter your full payment information:
Once you have saved your payment information, you can close the current tab and click the purple "Verify my billing information" button of Step 2:
If your payment information is correct, you'll be taken to Step 3, titled "Apply for the Heroku for GitHub Students Offer". Enter your first name, last name, and university.
Note Be sure to enter "EdX Boot Camps" as your University.
Click on the "I'm not a robot" checkbox to be presented with the captcha verification and follow the instructions to complete it; then, click the "Send" button:
Finally, you will be presented with a page with the title "Terms: Heroku for GitHub Students Offer." Simply click the "Agree" button:
You'll then be taken back to the "3 Easy Steps to Request Your Free Hobby Dyno" with all three steps checked. Now, just wait up to 24 hours for an email from Heroku confirming that your platform credits have been applied to your Heroku account:
This page was updated 4 months ago
© 2022 edX Boot Camps LLC. Confidential and Proprietary. All Rights Reserved.
Category: heroku
Tagged under: heroku, heroku cli, installation, guide,
All Posts
- Web Literacy
- How to Install MongoDB
- Heroku Deployment Guide
- How to Install the Heroku CLI
- Deploy with Heroku and MongoDB Atlas
- API Resources
- HTML Cheatsheet
- MySQL Installation Guide
- MySQL Reference Guide
- How to Use API Keys
- Using the GraphQL Playground in a MERN application
- Getting Started with Git
- Regular Expression Tutorial
- Professional README Guide
- Deploy with Heroku and MySQL
- How to Install NodeJS
- Set Up MongoDB Atlas
- What Makes Up a Web Development Project?
- A Growth Mindset for Life
- Video Submission Guide
- Developer Resources
- Introduction to Computer Structure and Organization
- Advanced Computer Skills
- Introduction to Computer Skills