Go back

Run the following commands in your terminal:

git config --global [user.name](<http://user.name/>) "Your GitHub Username" git config --global user.email "[[email protected]](<mailto:[email protected]>)"

To confirm that your Git username and email are set correctly, run:

git config --global [user.name](<http://user.name/>) git config --global user.email

This will display the username and email Git is currently using globally.

GitHub now requires authentication for any actions (e.g., pushing code).

Using HTTPS with Personal Access Token

If you're using HTTPS to connect to GitHub, you'll need to set up a Personal Access Token (PAT) instead of your password. Here's how:

  1. Generate a PAT:
  2. Use the PAT for Authentication:

Configuring Git (with git config --global user.name and user.email) does not directly "connect" your Git setup to GitHub, but it ensures that your commits are associated with your GitHub account.