candy creative page logo
blog post

How to login to Github from the terminal

Tyler Clay up close and personal

Tyler Clay

Jul 3rd4 min read

Hello,

Today we have a quick tutorial for developers who may be having problems logging into Github from the terminal. This guide assumes you have some experience as a web developer and know what Github is. Let's jump straight in.

 

1. First you need to set your username with the following command. Replace YOUR_USERNAME with your actual Github username.

git config --global user.name "YOUR_USERNAME"

2. Next type the following commpand and you should get back the username you just entered. If your username is correct please continue to the next step.

git config --global user.name

3. The next command will set your email address. Please replace your_email_address@example.com in the code below with your actual github login email address.

git config --global user.email "your_email_address@example.com"

4. To verify your email saved correctly please run the following line of code

git config --global user.email

To get a list of all the information currently saved run

git config --global --list
The next time you push code to Github it will trigger a pop up that prompts you to enter your password. This popup will not show if you have previously logged into Github on your computer.

If you have previously logged into a Github account you need to delete the login entry in credential manager for Windows or keychain for MacOS to retrigger the login banner

In Conclusion

We hope we helped you get logged into Github from your terminal. As always feel free to reach out to us if you ever need assistance creating websites!

quote