If your network cannot reach GitHub directly, the following tasks in this project may fail:
git clonegit fetch / pull / push- opening GitHub in the browser
- pushing
.github/workflows/*to GitHub before validating Actions
Important:
If the workflow files have not actually been pushed to the default branch on GitHub, the Actions page may show no usable workflows at all.
Run:
git remote -vCommon forms:
origin https://github.com/terwer/autojs6-dev-tools.git (fetch)
origin https://github.com/terwer/autojs6-dev-tools.git (push)
origin git@github.com:terwer/autojs6-dev-tools.git (fetch)
origin git@github.com:terwer/autojs6-dev-tools.git (push)
For most developers, the simplest approach is:
- switch the GitHub remote to HTTPS
- configure a Git proxy
This is usually easier to debug than keeping an SSH remote behind a proxy.
For a SOCKS5 proxy:
$env:HTTP_PROXY="socks5h://127.0.0.1:12334"
$env:HTTPS_PROXY="socks5h://127.0.0.1:12334"
$env:ALL_PROXY="socks5h://127.0.0.1:12334"For an HTTP proxy:
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="http://127.0.0.1:7890"curl.exe --proxy socks5h://127.0.0.1:12334 https://github.comgit remote set-url origin https://github.com/terwer/autojs6-dev-tools.gitgit config --global http.proxy socks5h://127.0.0.1:12334
git config --global https.proxy socks5h://127.0.0.1:12334git ls-remote origin
git fetch originIf you keep:
git@github.com:terwer/autojs6-dev-tools.git
then plain HTTP_PROXY / HTTPS_PROXY may not be enough.
You usually need SSH proxy support as well.
Example ~/.ssh/config using ncat with SOCKS5:
Host github.com
HostName github.com
User git
ProxyCommand ncat --proxy 127.0.0.1:12334 --proxy-type socks5 %h %pThen test:
ssh -T git@github.com
git ls-remote originIf your machine does not have ncat, the faster fix is usually to switch the remote to HTTPS instead.
If origin still points to git@github.com:..., do not assume that setting only HTTP_PROXY and HTTPS_PROXY will make git push work.
That setup often fixes browser and curl traffic, but not SSH-based Git pushes.
curl.exe --proxy ... https://github.comgit remote -vgit ls-remote origingit fetch origingit push origin <branch>- confirm the branch update on GitHub
- only then check whether the Actions workflows are visible