Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git clone not working - error 443

Tags:

git

github

I am working from home and am trying to clone a repo from Github and am getting the following error:

git clone https://github.com/account/repo.git

Also tried

git clone git://github.com/account/repo.git

Error: Failed connect to github.com:443; No error while accessing https://github.com/account/repo/info/refs?service=git-upload-pac
fatal: HTTP request failed

I even tried to use SSH and this is what I get:

ssh: connect to host github.com port 22: Bad file number fatal: could not read from remote repository.

I was just able to clone it on my laptop so I know that I have the correct permissions, I just need help trying to figure out why this is happening on my desktop and it seems that all of the other suggestions don't seem to be working.

  • I am not using a proxy.
  • I cannot do pulls on other repos that already exist either.

EDIT Ok I ran the command suggested, here are the results:

$ ssh -i ~/.ssh/id_rsa -vvv [email protected]
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug2: ssh_connect: needpriv 0
debug1: Connecting to github.com [204.232.175.90] port 22.
debug1: connect to address 204.232.175.90 port 22: Not owner
ssh: connect to host github.com port 22: Bad file number

Any suggestions?

like image 893
gregwhitworth Avatar asked Apr 09 '13 17:04

gregwhitworth


People also ask

Why is my git clone not working?

If you have a problem cloning a repository, or using it once it has been created, check the following: Ensure that the user has gone through initial GitCentric login and has the correct username, email, and ssh. This should return a usage message that refers to the config-branch, config-repo, and ls-repo commands.

How do I authenticate git in terminal?

There are three main approaches you can take: Using a personal authentication token or password. Using an SSH key. Using your GitHub password with 2-factor authentication.


2 Answers

I know this may be general but I decided I wanted to get this answered, so here is what I did and it is now working correctly:

  • Uninstalled ALL git clients through windows (I had a couple initially for testing)
  • Installed the basic git bash from git
  • Turned off smart screen and ensured firewall and defender were off (they were)

Tried it again and it now works. My best guess is there was a mis-configuration somewhere - probably a wrong key (not sure how that happened since I updated it). At any rate it is working. It's probably the nuclear option but I hope this helps someone else that runs into this.

like image 95
gregwhitworth Avatar answered Nov 08 '22 02:11

gregwhitworth


I could resolve the 443 error by issuing this command :

git config --global http.proxy <proxyname:port>
like image 37
dghadge Avatar answered Nov 08 '22 00:11

dghadge