Create your GitHub account
GitHub is free and takes 5 minutes to set up. You’ll need it to:
- Back up your code
- Share your projects
- Download AI tools and examples
Step 1: Sign up
- Go to github.com
- Click “Sign up”
- Enter:
- Username: Pick something professional (employers will see this)
- Email: Use one you check regularly
- Password: Make it strong
Step 2: Verify your account
GitHub will send you an email. Click the link to verify.
Step 3: Set up your profile
Once logged in:
- Click your profile picture (top right) > “Your profile”
- Click “Edit profile”
- Add:
- Name: Your real name
- Image: Add a profile picture
- Bio: “Learning Python for AI development” (or similar)
Tell Git who you are (one-time setup):
# Open terminal in VS Code (Terminal > New Terminal)
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Use the same email you used for GitHub.
Step 5: Choose your authentication method
There are three ways to authenticate with GitHub. Choose one:
Recommended: We suggest using GitHub CLI for the easiest setup experience. It’s modern, simple, and handles authentication automatically.
GitHub CLI (Recommended)
HTTPS with Token
SSH Keys
GitHub CLI (gh)
Modern approach using GitHub’s official tool:
- Install GitHub CLI:
- Authenticate:
- Follow the prompts:
- Choose GitHub.com
- Choose SSH (recommended) or HTTPS
- Authenticate with browser
That’s it! Git will automatically use your gh credentials.Personal Access Token
Traditional method using tokens:
- Go to GitHub Settings (click profile > Settings)
- Scroll down to “Developer settings” (left sidebar)
- Click “Personal access tokens” > “Tokens (classic)”
- Click “Generate new token” > “Generate new token (classic)”
- Give it a name like “My Laptop” or “VS Code”
- Select scopes: check
repo (full control of repositories)
- Set expiration (or no expiration for convenience)
- Click “Generate token”
- Copy the token immediately (you won’t see it again!)
Save your token somewhere safe! You’ll need it when pushing code.
Using your token
When you push code for the first time:git push
# GitHub will ask for:
Username: your-github-username
Password: paste-your-token-here (NOT your GitHub password!)
SSH Keys
The most secure method - no passwords needed:
- Generate SSH key:
ssh-keygen -t ed25519 -C "[email protected]"
# Just press Enter for all prompts (accept defaults)
- Add to ssh-agent:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# In Git Bash (not Command Prompt):
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
- Copy your public key:
# macOS
pbcopy < ~/.ssh/id_ed25519.pub
# Windows (Git Bash)
cat ~/.ssh/id_ed25519.pub | clip
# Linux
cat ~/.ssh/id_ed25519.pub
# Then manually copy the output
- Add to GitHub:
- Test the connection:
ssh -T [email protected]
# You should see: "Hi username! You've successfully authenticated..."
Important: When cloning, use SSH URLs:# SSH URL (what you want)
git clone [email protected]:username/repo.git
# Not HTTPS URL
git clone https://github.com/username/repo.git
What’s next?
Now let’s learn how to create your first repository and clone existing projects.
Clone and create
Start using GitHub