-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-push-input.json
More file actions
43 lines (43 loc) · 3.35 KB
/
Copy pathgithub-push-input.json
File metadata and controls
43 lines (43 loc) · 3.35 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
{
"SKILL_NAME": "github-push",
"ONE_LINE_DESCRIPTION": "Push a local project to GitHub from Windows + China network environment",
"TRIGGER_CONTEXT_HINT": "mentions pushing, uploading, or putting code on GitHub",
"ENVIRONMENT_HINT": "from Windows or behind GFW/proxy",
"COMPATIBILITY": "git >=2.40, ssh, clash-verge or v2ray",
"OS": "Windows 11 Home China 10.0.26100",
"SHELL": "Git Bash (mingw64)",
"NETWORK": "GFW-restricted — GitHub blocked, requires proxy at 127.0.0.1:7890",
"TOOLS": "git 2.47, ssh, Clash Verge",
"ENVIRONMENT_WHY": "GitHub is blocked by GFW; git push/pull time out without a proxy. HTTPS triggers Windows credential manager popups that break non-interactive use.",
"TRIGGER_1": "push to GitHub",
"TRIGGER_2": "upload this project to GitHub",
"TRIGGER_3": "create a GitHub repo for this",
"TRIGGER_4": "put this on GitHub",
"TRIGGER_5": "push my code to GitHub",
"QUICK_START_COMMAND_1": "git config --global http.proxy http://127.0.0.1:7890 && git config --global https.proxy http://127.0.0.1:7890",
"QUICK_START_COMMAND_2": "git remote add origin git@github.com:USERNAME/REPO.git",
"QUICK_START_COMMAND_3": "git push -u origin main",
"QUICK_START_NOTE": "Replace USERNAME/REPO with your actual repo. Ensure SSH key is added to GitHub first.",
"STEP_1_TITLE": "Configure git proxy",
"STEP_1_COMMAND": "git config --global http.proxy http://127.0.0.1:7890\ngit config --global https.proxy http://127.0.0.1:7890",
"STEP_1_WHY": "Without proxy config, git push hangs or times out because GitHub is blocked by GFW. The proxy tunnels traffic through Clash Verge or v2ray.",
"STEP_2_TITLE": "Use SSH remote instead of HTTPS",
"STEP_2_COMMAND": "git remote add origin git@github.com:USERNAME/REPO.git",
"STEP_2_WHY": "HTTPS triggers Windows credential manager popups and often returns 403. SSH with key auth goes through the proxy cleanly. Ensure ~/.ssh/config has ProxyCommand configured for github.com.",
"STEP_3_TITLE": "Push with explicit branch name",
"STEP_3_COMMAND": "git push -u origin main",
"STEP_3_WHY": "Git Bash on Windows may misinterpret the default branch; explicit `-u origin main` avoids this. New repos default to 'main', not 'master'.",
"BAD_APPROACH_1": "git push without proxy config",
"WHY_FAILS_1": "GitHub is blocked by GFW at the network level",
"FAIL_SYMPTOM_1": "Connection times out after 60 seconds; 'fatal: unable to access'",
"BAD_APPROACH_2": "HTTPS remote + gh auth login",
"WHY_FAILS_2": "Browser OAuth flow blocked by proxy; Windows credential manager intercepts auth",
"FAIL_SYMPTOM_2": "Endless popup loop or 403 forbidden even after 'successful' login",
"BAD_APPROACH_3": "git push origin master",
"WHY_FAILS_3": "New repos default branch is 'main', not 'master'",
"FAIL_SYMPTOM_3": "'src refspec master does not match any' — branch doesn't exist",
"VERIFY_COMMAND": "git ls-remote --heads origin",
"EXPECTED_OUTPUT": "Lists remote branches without error, showing refs/heads/main",
"ADDITIONAL_NOTES": "If proxy address differs (v2ray uses 10809, others may vary), update config accordingly. If SSH key not set up: ssh-keygen -t ed25519 -C \"your@email.com\" then add to GitHub Settings → SSH Keys. The 'connect' tool for ProxyCommand comes with Git Bash; if missing, install mingw-w64-x86_64-connect via pacman.",
"SEE_ALSO": "GitHub docs: Connecting to GitHub with SSH; Clash Verge docs"
}