-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush_to_github.sh
More file actions
executable file
·73 lines (66 loc) · 2.01 KB
/
push_to_github.sh
File metadata and controls
executable file
·73 lines (66 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# Push to GitHub - Quick Script
echo "🚀 Pushing to GitHub: dd6ds/paddle_decoder_cross_platform"
echo ""
echo "⚠️ You will need to authenticate!"
echo ""
echo "Choose authentication method:"
echo "1. Personal Access Token (recommended for first-time)"
echo "2. SSH Key"
echo ""
read -p "Enter choice (1 or 2): " choice
if [ "$choice" = "1" ]; then
echo ""
echo "📝 Using HTTPS with Personal Access Token"
echo ""
echo "Steps:"
echo "1. Get token from: https://github.com/settings/tokens"
echo "2. Generate new token (classic)"
echo "3. Check 'repo' scope"
echo "4. Copy the token"
echo ""
echo "When prompted:"
echo " Username: dd6ds"
echo " Password: [paste your token]"
echo ""
read -p "Press Enter when ready to push..."
git push -u origin main
elif [ "$choice" = "2" ]; then
echo ""
echo "🔑 Using SSH"
echo ""
echo "First, let's set remote to SSH..."
git remote set-url origin git@github.com:dd6ds/paddle_decoder_cross_platform.git
echo "✓ Remote updated to SSH"
echo ""
echo "Make sure you have:"
echo "1. Generated SSH key: ssh-keygen -t ed25519"
echo "2. Added to GitHub: https://github.com/settings/keys"
echo ""
read -p "Press Enter when ready to push..."
git push -u origin main
else
echo "Invalid choice. Exiting."
exit 1
fi
echo ""
if [ $? -eq 0 ]; then
echo "✅ Successfully pushed to GitHub!"
echo ""
echo "🎉 Your repository is now live at:"
echo " https://github.com/dd6ds/paddle_decoder_cross_platform"
echo ""
echo "Next steps:"
echo "1. Visit your repository on GitHub"
echo "2. Add a description and topics"
echo "3. Create a release with compiled binaries"
else
echo "❌ Push failed!"
echo ""
echo "Common issues:"
echo "- Wrong token/password"
echo "- Repository doesn't exist on GitHub"
echo "- SSH key not configured"
echo ""
echo "Check GIT_CONFIGURED.md for detailed troubleshooting"
fi