0

First of all, I use the latest pop os! LTS version and my problem whenever I try to push my code into a repo an error occurs. here is exactly what I did:

  1. I initiated a git repo in my local machine
  2. I staged all changes
  3. I committed
  4. git branch -M main
  5. it remote add origin https://example.
  6. git push -u origin main

I got this error:

fatal: unable to access 'https://github.com/example :Failed to connect to github.com port 443: Connection refused

knowing that I tried this command: git push --set-upstream origin main and I also have the same problem when I tried to config my ssh key

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34
Antutu Cat
  • 105
  • 4
  • Does this answer your question? [GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error](https://stackoverflow.com/questions/18356502/github-failed-to-connect-to-github-443-windows-failed-to-connect-to-github) – Tom W May 21 '21 at 21:40
  • @TomW No, I don't use any proxy and my country is not banneded – Antutu Cat May 21 '21 at 21:43

1 Answers1

0

This error means that when your machine is attempting to connect to the HTTPS port for github.com, the remote server or some machine in between is preventing the connection or indicating that there is no server there. In technical details, you've received a TCP RST when trying to start your TCP connection.

Clearly GitHub is up, so the problem is likely elsewhere. If you are using a proxy, such as with http.proxy or the http_proxy environment variable, that is likely the cause. If you've misconfigured your firewall or are using an antivirus (which I don't recommend on Linux), that can be the problem as well. It may also be that your ISP, network administrator, or country of residence have blocked that, in which case you'd need to address that with them.

bk2204
  • 64,793
  • 6
  • 84
  • 100