Error When Clone/Push Git Repos 443: Bad access, but no proxy used
Asked Answered
F

3

5

I am having really strange issue when do these operations clone/push with git remote repo.

Let's say I'm trying to push my changes to remote repo.

git push origin master

Then I will get this error.

fatal: unable to access '[Remote_Repo]': Failed to connect to github.com port 443: Bad access

I checked this issue and everyone saying this related to proxy. But I am quiet sure that I am not using a proxy.

Flump answered 17/6, 2017 at 4:33 Comment(0)
F
10

Here what happened. Kaspersky internet security blocked the connection to the git server and that's why I got that error.

So anyone facing the similer kind of issue, try disabling your anti virus first.

Flump answered 19/6, 2017 at 5:9 Comment(1)
Yes, that was part of the "host of reasons" I mentioned before: I have included the AV one in the answer for more visibility, as well as a more sensible recommendation (than disabling the AV)Byars
B
2

It depends on the nature of the remote server (here github.com)

That could simply means an issue on the remote server side (even though there is no recent alert).
Locally, it could be a firewall issue or an host of other causes (make sure your Windows is up-to-date with the latest patches

As the OP Rukshan Dangalla confirms in the comments, the anti-virus (Kaspersky internet security) was blocking 443.
You can see an example of such an interference in this issue, where it seems like the antivirus interferes with connection attempts, leading git to think connections were unsuccessful.
Adding git to a whitelist in the AV can be a good workaround.
(Do not disable the AV!)


Also check from the command-line if you have a credential helper (which might have cached the wrong credentials)

git config -l|grep credential

See "How to sign out in Git Bash console in Windows?": That is Git for Windows using the latest Microsoft Git Credential Manager for Windows.

From the discussion:

I tried the cloning in another machine which connected to same network and it worked. Issue is in my machine :(


As a last resort, You can also try and use an ssh url (if you have registered a public key on the server side)

git remote set-url origin [email protected]:<username>/<reponame>
Byars answered 17/6, 2017 at 4:36 Comment(11)
Thanks a lot for the quick response. I tried turning off the firewall as well. But no luck. Also I tried the same thing in another computer. Everything worked fine including push and etc. Now I'm suspecting this issue related to windows updates :/Flump
Other thing I wanted to tell, when I trying to connect to the remote repo using the VisualStudio, it is working (in the machine that I can't do this in command line). That's very strange.Flump
@RukshanDangalla From the command line, do you have a credential helper? (I have edited the answer). If yes, and if its value is manager, open you "Maange Windows Credential", and look for a github.com entry.Byars
yes I have the credential helper and there is a entry for Github in the manager. Shall I remove it?Flump
@RukshanDangalla Yes, then push again: a popup will ask you for your GitHub credentials: enter them again. It should work.Byars
yes I removed it and then tried to push. No window appeared asking credentials and gave me the same error I mentioned in the question :(Flump
Yes I am trying that out. But here, I tried to push using Visual Studio while credentials removed. Now I can see a window pop up to get credentials. So this issue totally related to command lineFlump
Yes SSH worked :). It's really strange. Thanks for the support. Any idea why this happened?Flump
@RukshanDangalla Can you try and remove any credential line from your git config files (do a git config -l --show-origin)? Then try to push (after restoring the http url with git remote set-url origin https://github.com/<username>/<reponame>): would a push from command-line prompt you for a username/password?Byars
Let us continue this discussion in chat.Flump
finally I found the culprit, it's my anti virus. Somehow it's blocking the connection. Thank you very much for the help sir. I really appreciate it.Flump
D
0

In my case it was the TripMode application, since I was allowing specific apps to use the internet bandwidth, so Git and it's related threads could not access to internet.

Solution: Stop TripMode or allow Git and it's related threads.

Dogooder answered 2/1, 2022 at 5:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.