Trending
| 8:52 PM IST
Create a GitHub Account, Secure It and Connect It to Your Computer (Part 6)
Tech

Create a GitHub Account, Secure It and Connect It to Your Computer (Part 6)

Sign up for GitHub, choose a professional username, switch on two-factor authentication and connect your computer so you can push code. Part 6 of our visual Git and GitHub series.

By · 10 min read 0 views Rate it 0 comments

To create a GitHub account, go to github.com, click Sign up and enter your email, a password and a username. Then turn on two-factor authentication and connect your computer, either by signing in through GitHub Desktop or VS Code, or by setting up an SSH key. Account passwords alone no longer work for pushing code.

Sneha almost chose the username "cutecoder_sneha_2003". Arjun stopped her just in time. "This name will appear on every project link you send to a client. Choose something you would happily print on a visiting card." In Part 5 you installed Git, VS Code and GitHub Desktop. Git now works on your computer, but it has nowhere online to send your work. In this Part 6 we create that online home, choose a professional name and secure it properly, because your GitHub account will soon hold your portfolio, client work and reputation.

Your one-minute summary

  • Sign up free at github.com; choose a professional username
  • Use the same email you set in Git (or GitHub's private noreply email)
  • Turn on two-factor authentication (2FA) with an authenticator app
  • Since 13 August 2021, GitHub no longer accepts account passwords for Git operations
  • Connect your computer by signing in through an app (easiest) or with an SSH key

How do I create a GitHub account?

Signing up takes about five minutes, and the Free plan is enough for everything in this series.

Creating your GitHub account

Open github.comClick "Sign up" at the top right
Enter your emailUse the email you set with git config in Part 5
Create a strong passwordLong and unique; a password manager helps
Choose a usernameThis becomes github.com/yourname
VerifySolve the puzzle and enter the code sent to your email

If GitHub asks about plans, choose Free. You can upgrade later if you ever need to.

How should I choose a GitHub username?

Your username appears in every project link you share, such as github.com/snehareddy/bakery-site, and in free website addresses like snehareddy.github.io. Treat it like a professional email address.

Username: good vs avoid

Good choices

  • snehareddy, sneha-reddy, sreddy-dev
  • Your real name or a stable brand name
  • Short and easy to spell aloud on a phone call

Avoid

  • cutecoder_sneha_2003, sneha.lovesbiryani
  • Names tied to one college year or job
  • Long names full of numbers and underscores
Keep your personal email privateIn GitHub's email settings, you can tick "Keep my email addresses private". GitHub then gives you a special noreply address. If you use that address in git config user.email, your commits still link to your profile, without showing your real email to the world.
Also readGit vs GitHub vs GitLab vs Bitbucket: What Is the Difference? (Part 2)

Why do I need two-factor authentication on GitHub?

Two-factor authentication (2FA) means logging in needs your password plus a one-time code from your phone. Even if someone steals your password, they cannot get in. GitHub takes this seriously: its documentation notes that since March 2023 it has required users who contribute code on GitHub.com to enable 2FA.

Turning on 2FA

Install an authenticator appGoogle Authenticator, Microsoft Authenticator or a password manager
Open GitHub settingsProfile picture, then Settings, then "Password and authentication"
Enable two-factor authenticationScan the QR code with your app and type the 6-digit code
Save your recovery codesDownload them and store them somewhere safe, offline
Optional: add a passkey or security keyExtra, phishing-resistant backup methods

Recovery codes are your only way in if you lose your phone. Do not skip that step.

Layers that protect your account

Strong, unique passwordStops simple guessing
Two-factor code from your phoneStops stolen passwords
Recovery codes stored offlineSaves you if your phone is lost
Never sharing keys or codesStops social engineering

How do I connect Git on my computer to GitHub?

Your computer must prove it is you before GitHub accepts your pushes. Since 13 August 2021, GitHub no longer accepts your account password for Git operations. Instead you use one of these methods:

Three ways to connect, from easiest

1. Sign in through an app (easiest)

  • GitHub Desktop: File, Options, Accounts, Sign in
  • VS Code: click "Sign in with GitHub" when it asks
  • Your browser handles the login safely

2. HTTPS with a credential helper

  • Git for Windows includes Git Credential Manager
  • The first push opens a browser login
  • Your login is then remembered securely

3. SSH key (popular with developers)

  • Create a key pair on your computer
  • Add the public key to GitHub
  • No login prompts afterwards

Pick one. Sneha started with option 1 and tried SSH a month later.

Option 1: Sign in with GitHub Desktop or VS Code

In GitHub Desktop, go to File, Options (Windows) or GitHub Desktop, Settings (Mac), choose Accounts and click "Sign in". Your browser opens, you approve, and you are done. VS Code works the same way: the first time you push or clone, it offers "Sign in with GitHub".

Option 2: HTTPS from the terminal

On Windows, the Git for Windows installer includes Git Credential Manager. The first time you push from Git Bash, a window opens for you to log in to GitHub in the browser. After that, Git remembers your login securely. On a Mac, installing the GitHub CLI and running gh auth login is the simplest equivalent.

Option 3: Create an SSH key

An SSH key is a pair of files: a private key that stays on your computer and a public key you give to GitHub. Run these in Git Bash or Terminal:

StepCommand or action
1. Create the keyssh-keygen -t ed25519 -C "sneha@example.com" and press Enter to accept the default location
2. Show the public keycat ~/.ssh/id_ed25519.pub and copy the line it prints
3. Add it to GitHubSettings, then "SSH and GPG keys", then "New SSH key"; paste and save
4. Test the connectionssh -T git@github.com; type "yes" the first time
Never share the private keyOnly the file ending in .pub goes to GitHub. The other file, id_ed25519 without .pub, is like your house key. Never paste it anywhere, email it or commit it to a repository.

How do I set up my GitHub profile?

A tidy profile makes a good first impression on clients and recruiters. Spend ten minutes on these basics:

Profile setup checklist

  • Add a clear profile photo
  • Write a one-line bio, such as "Web developer in Guntur, building websites for local businesses"
  • Add your city, website or LinkedIn link
  • Turn on two-factor authentication and save recovery codes
  • Choose whether to keep your email private
  • Later: pin your best projects to the top of your profile

You can even create a profile README: make a public repository with exactly the same name as your username, and GitHub shows its README.md on your profile page. We cover READMEs in Part 17.

What does the GitHub home screen show?

Finding your way around GitHub

Top barSearch, the + button for a new repository, notifications, profile menu
Left sideYour repositories, with a green "New" button
CentreActivity from projects and people you follow
Profile pageBio, pinned projects and the green contribution graph

Before Part 7, make sure you can

  • Log in to github.com with your new account
  • Pass the 2FA check with your authenticator app
  • Find your saved recovery codes
  • See your account in GitHub Desktop or VS Code, or pass ssh -T git@github.com
  • Explain why your password alone cannot push code

Her View

Online security can feel like one more chore, but 2FA is the digital version of locking your front door. Your GitHub account will hold work you are proud of, and possibly code your clients rely on. Setting it up once, calmly, protects all of that. And a thoughtful profile, with your real name, city and a friendly bio, helps the right people find you.

Also readWhat Is Version Control? Git and GitHub for Beginners (Part 1)

His Insight

Choose your connection method based on where you work. If you mostly use GitHub Desktop or VS Code, sign in through the app. If you use the terminal on several machines, SSH keys save time. Either way, use an authenticator app rather than SMS for 2FA, store recovery codes offline and never commit keys or tokens to any repository.

H View Verdict

A GitHub account is free, quick to create and worth securing from day one. With 2FA switched on and your computer connected, you are ready to create your first real repository. That is exactly what we do in Part 7: git init, your first commit and your first project.

Self-assessment: test yourself

Ready? Tap an option for each question. You will see right away whether you got it, with a short explanation, and your score at the end. Take your time, and try again as often as you like.

GitHub account quiz: 10 questions

1. Since 13 August 2021, what does GitHub NOT accept for Git operations?

  1. SSH keys
  2. Your account password
  3. Personal access tokens
  4. Signing in through GitHub Desktop

Passwords were replaced by tokens, SSH keys and app sign-in.

2. Which SSH key file is safe to give to GitHub?

  1. id_ed25519
  2. id_ed25519.pub
  3. Both
  4. Neither

Only the public key (.pub) is shared. The private key never leaves your computer.

3. Why save 2FA recovery codes?

  1. To share with friends
  2. To log in if you lose your phone
  3. To speed up pushes
  4. They are required for SSH

Recovery codes let you access your account without your authenticator.

4. Which is the best GitHub username for a professional profile?

  1. cutecoder_sneha_2003
  2. snehareddy
  3. temp-account-1
  4. sneha.lovesbiryani

A short, real-name username is easy to remember and share.

5. Which command tests an SSH connection to GitHub?

  1. git --version
  2. git push
  3. ssh -T git@github.com
  4. git config --list

ssh -T git@github.com confirms GitHub recognises your key.

6. What is the easiest way for a beginner to connect their computer to GitHub?

  1. Email your password to GitHub
  2. Sign in through GitHub Desktop or VS Code
  3. Share your private SSH key
  4. Use an old Git version

App sign-in opens a secure browser login with no keys to manage.

7. What does "Keep my email addresses private" give you?

  1. A paid plan
  2. A noreply email address for your commits
  3. A new username
  4. Free hosting

GitHub provides a noreply address that still links commits to your profile.

8. Which 2FA method does GitHub recommend over SMS?

  1. Email codes
  2. An authenticator (TOTP) app
  3. No 2FA
  4. Writing the password twice

Authenticator apps are more secure than SMS codes.

9. Which address would Sneha's free personal website use?

  1. sneha.com
  2. snehareddy.github.io
  3. github.com/sneha.html
  4. snehareddy.git

GitHub Pages user sites use username.github.io (Part 18).

10. How do you show a README on your GitHub profile page?

  1. Upload a PDF in Settings
  2. Create a public repo with the same name as your username
  3. Email GitHub support
  4. Pin any repository

GitHub displays the README of the repository named after your username.

Frequently asked questions

Is a GitHub account free?

Yes. The Free plan includes unlimited public and private repositories, which is plenty for learning, portfolios and small client projects.

Can I change my GitHub username later?

Yes, in Settings. GitHub redirects many old links, but some, such as old GitHub Pages addresses, may break, so choose carefully at the start.

Do I need SSH if I use GitHub Desktop?

No. Signing in through GitHub Desktop is enough for pushing and pulling from that app.

What if I lose my phone and my recovery codes?

Account recovery becomes difficult and may not be possible. That is why GitHub recommends storing recovery codes safely and adding a second method, such as a passkey or security key.

Part 6 of 20 in our Git and GitHub for Beginners series. A small tip from us: print your recovery codes and keep them with your important documents. Next up, Part 7: Your first repository and your first commit.
Topics: Tech
Harika Behara

Writes for H View, where every story follows our editorial policy and is reviewed before it is published.

All stories by Harika →

H View stories follow our editorial policy. Spotted an error? Tell us and we will correct it.

Rate this article

One tap is enough. No comment needed.

Your rating
Be the first to rate it.

Was this article helpful?

Your answer goes straight to our editors.

Comments0

Be kind and stay on topic. Comments with links are checked before they appear.

No comments yet. Start the conversation.

The H View Brief

Our best stories, in your inbox.

The week’s best Her View, His Insight reading in one short, useful note.

Free. We only use your email to send The H View Brief. Unsubscribe any time.