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:
36
scripts/push-to-github.sh
Executable file
36
scripts/push-to-github.sh
Executable 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
|
||||
|
||||
Reference in New Issue
Block a user