Wednesday, July 9, 2025

Uploading the Full-Stack To-Do List App to GitHub Using a Personal Access Token

 Deploying a web app like our full-stack Spring Boot + React To-Do List often starts by pushing the source code to GitHub. If you've encountered issues with the traditional username/password authentication (especially after GitHub disabled password-based logins), this guide will walk you through using a Personal Access Token (PAT) instead.


πŸ” Step 1: Generate a Personal Access Token

  1. Go to https://github.com/settings/tokens.

  2. Click "Generate new token (classic)".

  3. Add a descriptive name, like "todo app push access".

  4. Set an expiration date (e.g., 30 or 90 days).

  5. Under Scopes, check at least:

    • repo (full control of private repositories)

  6. Click Generate Token.

  7. Copy the token now. GitHub will not show it again.


πŸ“ Step 2: Initialize Git in Your Project

If you haven’t already, open your terminal (Git Bash on Windows) and navigate to your project folder:

cd /c/todo_app

Initialize the Git repo:

git init

git add .

git commit -m "Initial commit for full-stack To-Do app"

🌐 Step 3: Add Your Remote Repository

Go to https://github.com, create a new repository called todo.

Then link your local project to it:

git remote set-url origin https://<token>@github.com/<username>/todo.git

Replace yourusername with your GitHub username.


πŸš€ Step 4: Push Code Using the Personal Access Token

When you run:

git push -u origin main

✔️ Once successful, your project is live on GitHub.


No comments:

Post a Comment

Deploying a React Frontend to Railway: A Complete Guide (To-Do App)

 If you've already deployed your Java Spring Boot backend to Railway, congratulations — the hardest part is done! πŸŽ‰ Now it’s time to ...