Last updated: 2026-05-19

Account Setup and Configuration

Setting up your GitHub account correctly from the start saves you friction later. Most of the configuration covered here is a one-time process — once done, it persists across every repository and project you work on.


Creating an Account

Visit https://github.com and sign up with a username, email address, and password. Your username becomes part of your public identity on the platform — it appears in your profile URL, in repository URLs, and in every comment, pull request, and contribution you make.

Choosing a username:

  • Keep it professional — many developers use their GitHub username as a public identifier.
  • Shorter is better — you will type it and share it frequently.
  • Avoid numbers and random characters if possible — wariz is more memorable than wariz4872.

After signing up, GitHub sends a verification email to the address you provided. Verify it promptly — some features, including pushing to repositories and creating organisations, require a verified email.


SSH Access

GitHub supports two protocols for connecting to repositories: HTTPS and SSH.

ProtocolHow It WorksWhen to Use
HTTPSAuthenticates with a username and personal access tokenGetting started quickly, occasional contributors
SSHAuthenticates with a cryptographic key pair stored on your machineRegular daily use — no password prompts

HTTPS works immediately without any setup, but you will be prompted for credentials on every push unless you configure a credential manager. SSH requires a one-time setup but is seamless afterwards — once your key is registered with GitHub, every push and pull is authenticated automatically.

Generating an SSH key

If you do not already have an SSH key pair on your machine:

ssh-keygen -t ed25519 -C "you@example.com"

Accept the default file location (~/.ssh/id_ed25519) and optionally set a passphrase. This creates two files:

  • ~/.ssh/id_ed25519 — your private key. Never share this.
  • ~/.ssh/id_ed25519.pub — your public key. This is what you give to GitHub.

Adding your public key to GitHub

Copy the contents of your public key:

cat ~/.ssh/id_ed25519.pub

Then on GitHub:

  1. Click your profile picture → Settings.
  2. In the left sidebar, click SSH and GPG keys.
  3. Click New SSH key.
  4. Give the key a descriptive name — "Work Laptop", "Home Desktop" — so you can identify and revoke it later if needed.
  5. Paste the public key into the key field and save.

Verifying the connection

ssh -T git@github.com
Hi wariz! You've successfully authenticated, but GitHub does not provide shell access.

This confirms your key is working. From now on, use SSH URLs when cloning:

git clone git@github.com:user/repository.git

Personal Access Tokens (HTTPS Authentication)

If you prefer HTTPS over SSH, GitHub no longer accepts plain passwords for Git operations. You must use a Personal Access Token (PAT) instead.

To generate one:

  1. Go to SettingsDeveloper settingsPersonal access tokensTokens (classic).
  2. Click Generate new token.
  3. Give it a descriptive name, set an expiration, and select the scopes you need (at minimum, repo for repository access).
  4. Copy the token immediately — GitHub will not show it again.

Use the token as your password when Git prompts for credentials over HTTPS. To avoid typing it repeatedly, configure a credential helper:

# macOS — stores credentials in Keychain
git config --global credential.helper osxkeychain

# Windows — stores credentials in Windows Credential Manager
git config --global credential.helper manager

# Linux — caches credentials in memory for 15 minutes
git config --global credential.helper cache

Your Profile

Your GitHub profile is your public face on the platform. To edit it:

  1. Click your profile picture → Your profile.
  2. Click Edit profile.

Key profile fields:

FieldNotes
NameYour real name or professional name — shown on your profile and in contributions
BioA short description of who you are and what you work on
CompanyOptional — useful for professional context
LocationOptional — helps collaborators identify time zones
WebsiteLink to a portfolio, blog, or personal site
AvatarUpload a photo or image — shown next to your username everywhere on GitHub

A complete, professional profile matters. Many employers and collaborators look at GitHub profiles when evaluating developers — a blank profile with no bio, no avatar, and no pinned repositories signals less than a filled-out one.

Profile README

GitHub supports a special repository that, when created with your exact username as the repo name, renders its README directly on your profile page. This is a widely used way to introduce yourself, showcase your work, and personalise your profile beyond the basic fields.

To set one up, create a repository named exactly the same as your username (e.g. wariz/wariz) and add a README.md to it. Whatever you write there appears on your profile page.


Email Addresses

GitHub uses your email address to link commits to your account. When you push commits whose author email matches an email on your GitHub account, those commits appear in your contribution history and profile activity.

If you use multiple email addresses across different machines or projects, add all of them:

  1. Go to SettingsEmails.
  2. Add each address you use in Git commits.
  3. Verify each one.

One address is designated as primary — this is where GitHub sends notifications and account emails.

Keeping your email private

If you prefer not to expose your personal email in commits, GitHub provides a private noreply email address you can use instead:

  1. Go to SettingsEmails.
  2. Enable Keep my email addresses private.
  3. GitHub gives you an address in the format username@users.noreply.github.com.

Configure Git to use this address for commits:

git config --global user.email "username@users.noreply.github.com"

Two-Factor Authentication (2FA)

Two-factor authentication adds a second verification step to your login — in addition to your password, you must provide a time-sensitive code from an authenticator app or hardware key. If your password is stolen, an attacker still cannot access your account without the second factor.

GitHub strongly recommends enabling 2FA, and for some organisations it is required for membership.

To set it up:

  1. Go to SettingsPassword and authentication.
  2. Under Two-factor authentication, click Enable.
  3. Choose your method:
    • Authenticator app (recommended) — apps like Authy, 1Password, or Google Authenticator generate time-based codes.
    • SMS — GitHub sends a code via text message (less secure than an app).
    • Security key — a physical hardware key like a YubiKey.

After enabling 2FA, GitHub shows you recovery codes — a set of one-time codes you can use if you lose access to your second factor. Download and store these somewhere safe. Losing both your 2FA device and your recovery codes can lock you out of your account permanently.


Notification Settings

GitHub sends notifications for repository activity — issues, pull requests, comments, mentions. By default this can be overwhelming. Configure notifications early:

  1. Go to SettingsNotifications.
  2. Choose how you want to be notified:
    • Email — notifications sent to your inbox.
    • Web — notifications appear in the GitHub notification centre (the bell icon).
  3. Configure which activities trigger notifications:
    • Participating — conversations you are directly involved in.
    • Watching — all activity on repositories you watch.

A sensible starting configuration: web notifications for participating, email only for direct mentions. This keeps your inbox manageable while ensuring you don't miss anything important.


A Setup Checklist

Here is the complete first-time setup sequence for a new GitHub account:

☐ Create account at github.com and verify your email
☐ Upload a profile photo
☐ Fill in your bio, location, and website
☐ Generate an SSH key and add the public key to GitHub
☐ Verify SSH access: ssh -T git@github.com
☐ Add all email addresses you use in Git commits
☐ Optionally enable the private noreply email
☐ Enable two-factor authentication and save recovery codes
☐ Configure notification preferences
☐ Optionally create a profile README repository