I have been having a problem with my git in so long, i have tried everything i could and it din't change anything.
My git works well locally, it works with init, commits, etc.
The problem is when i go to make whatever with github, since making a git clone
, or git push
It doesn't work with either github CLI or Git Bash, or cmd.
Any of those commands i put in, just yield the following error:
fatal: unable to connect to github.com
github.com[0: 140.82.114.4]: errno=Unknown error
failed to run git: exit status 128
I've been trying with some internet solution perspectives:
host
file in C:\Windows\System32\drivers\etc
location for local DNS possible incorrect configurationping
from github.com
server and tracert github.com
command for viewing github request trace and it works good as well.culr
command to download the main branch zip file, through cmd and it WORKED, downloading the zip file!!!:curl https://github.com/user/repo.git | git clone url:-
(of course, replacing my user and repo names)
unset
:git config --global --unset http.proxy
I think that the problem is a git configuration realated with port or network, but i don't find it
i solved the problem, i tried this solution but in other way.
Adding this manually to the .gitconfig
file, located within %USERPROFILE%
directory:
[url "https://"]
insteadOf = ssh://
insteadOf = git://
because with the cmd
commands:
git config --global url."https://".insteadOf git://
git config --global url."https://".insteadOf ssh://
it was not setting up the configuration correctly.
I think what was happening is that git was trying to access GitHub via ssh
and the port used for that protocol is 9418, which seemed to be blocked somehow. I discovered that using netstat
tool from cmd
which showed me the SYN_SEND
state of the requests when i tried to do git ls-remote
.
It is a patch solution, but it fixed it :(