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
This commit is contained in:
defiQUG
2025-11-10 20:28:14 -08:00
parent 2633de4d33
commit 62815936cc
2 changed files with 136 additions and 0 deletions

100
docs/GITHUB_SETUP.md Normal file
View File

@@ -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: <paste-your-token-here>
```
## 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

36
scripts/push-to-github.sh Executable file
View File

@@ -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