From 62815936ccef48c40bba9ed38091dbc2825a9ea3 Mon Sep 17 00:00:00 2001 From: defiQUG Date: Mon, 10 Nov 2025 20:28:14 -0800 Subject: [PATCH] docs: Add GitHub authentication setup guide and push script - Add scripts/push-to-github.sh for automated push after SSH setup - Add docs/GITHUB_SETUP.md with comprehensive setup instructions - Includes SSH key setup, token-based authentication, and troubleshooting --- docs/GITHUB_SETUP.md | 100 ++++++++++++++++++++++++++++++++++++++ scripts/push-to-github.sh | 36 ++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 docs/GITHUB_SETUP.md create mode 100755 scripts/push-to-github.sh diff --git a/docs/GITHUB_SETUP.md b/docs/GITHUB_SETUP.md new file mode 100644 index 0000000..357a73c --- /dev/null +++ b/docs/GITHUB_SETUP.md @@ -0,0 +1,100 @@ +# GitHub Authentication Setup + +## Current Status + +✅ **Commit ready to push:** `2633de4 feat(eresidency): Complete eResidency service implementation` +✅ **SSH key generated:** `~/.ssh/id_ed25519` +✅ **Remote configured:** `git@github.com:Order-of-Hospitallers/the-order-monorepo.git` +⚠️ **Push blocked:** SSH key needs to be added to GitHub + +## Your SSH Public Key + +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGb+gFevwMFw/Li1JLyIvpYZ4O6/f1KHutekqtPapY/l defi@defi-oracle.io +``` + +## Quick Setup (SSH - Recommended) + +1. **Copy your SSH public key:** + + ```bash + cat ~/.ssh/id_ed25519.pub + ``` + +2. **Add to GitHub:** + - Visit: https://github.com/settings/keys + - Click "New SSH key" + - Title: `WSL2 - the-order-monorepo` + - Paste the public key + - Click "Add SSH key" + +3. **Test connection:** + + ```bash + ssh -T git@github.com + ``` + + You should see: `Hi defiQUG! You've successfully authenticated...` + +4. **Push your commit:** + ```bash + git push + ``` + Or use the script: + ```bash + ./scripts/push-to-github.sh + ``` + +## Alternative: Personal Access Token (HTTPS) + +If you prefer HTTPS: + +1. **Create a Personal Access Token:** + - Visit: https://github.com/settings/tokens + - Click "Generate new token (classic)" + - Select `repo` scope + - Generate and copy the token + +2. **Configure credential helper:** + + ```bash + git config --global credential.helper store + ``` + +3. **Update remote URL:** + + ```bash + git remote set-url origin https://github.com/Order-of-Hospitallers/the-order-monorepo.git + ``` + +4. **Push (enter token as password):** + ```bash + git push + Username: defiQUG + Password: + ``` + +## Verification + +After pushing, verify with: + +```bash +git log --oneline origin/main..HEAD +``` + +Should show no commits (all pushed). + +## Troubleshooting + +- **Permission denied:** Make sure SSH key is added to GitHub +- **Key not found:** Run `ssh-add ~/.ssh/id_ed25519` +- **Connection timeout:** Check your internet connection +- **Wrong key:** Verify key fingerprint matches GitHub + +## Next Steps + +Once pushed, your changes will be available on GitHub and can be: + +- Reviewed in pull requests +- Deployed via CI/CD +- Collaborated on with team members diff --git a/scripts/push-to-github.sh b/scripts/push-to-github.sh new file mode 100755 index 0000000..2423bb7 --- /dev/null +++ b/scripts/push-to-github.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Script to push commits to GitHub after SSH key is added + +set -e + +echo "=== GitHub Push Script ===" +echo "" + +# Check SSH authentication +echo "Testing SSH connection to GitHub..." +if ssh -T git@github.com 2>&1 | grep -q "successfully authenticated"; then + echo "✓ SSH authentication successful" + echo "" + echo "Pushing commit to GitHub..." + git push + echo "" + echo "✓ Successfully pushed to GitHub!" + echo "" + echo "Commit details:" + git log --oneline -1 +else + echo "✗ SSH authentication failed" + echo "" + echo "Please add your SSH key to GitHub:" + echo "1. Visit: https://github.com/settings/keys" + echo "2. Click 'New SSH key'" + echo "3. Title: 'WSL2 - the-order-monorepo'" + echo "4. Paste this public key:" + echo "" + cat ~/.ssh/id_ed25519.pub + echo "" + echo "5. Click 'Add SSH key'" + echo "6. Run this script again: ./scripts/push-to-github.sh" + exit 1 +fi +