This guide uses one SSH SOCKS tunnel for both:
- Browsing websites like
https://github.com - Pushing Git over HTTPS, e.g.
https://github.com/codex-router/codex.gerrit.git
Open WSL terminal and run:
ssh -N -D 7898 youruser@your-ssh-serverKeep this terminal open while browsing or running Git commands.
Configure browser proxy:
- SOCKS Host:
127.0.0.1 - Port:
7897 - Type:
SOCKS5 - Enable remote DNS over SOCKS (important)
Then open sites normally, for example:
https://git.521000.besthttp://example.com
In your repository, set/check remote:
git remote set-url origin https://github.com/codex-router/codex.gerrit.git
git remote -vConfigure proxy for this repo (recommended):
git config http.proxy socks5h://127.0.0.1:7898
git config https.proxy socks5h://127.0.0.1:7898Push:
git push origin mainWhen prompted for credentials:
- Username: your GitHub username
- Password: your GitHub Personal Access Token (PAT)
GitHub does not accept account password for Git over HTTPS.
ALL_PROXY=socks5h://127.0.0.1:7898 git push origin maingit config --unset http.proxy
git config --unset https.proxy- Check tunnel is listening:
ss -ltn | grep 7898 - Verify remote URL:
git remote -v
- If auth fails, clear old cached credentials and retry using PAT.