So I followed the guide on how to add a SSH key to GitHub, and added a new SSH key with a passphrase to GitHub and the SSH agent. Now, if I run Show Help would be appreciated. UPDATE: When I try and clone a repository which for which I have write access from a friend's GitLab instance, it throws the same error. Seems like this is a problem with SSH, not with the keys. (I have them added to the instance.) asked Apr 18, 2015 at 18:14
jonajona 3231 gold badge2 silver badges7 bronze badges 8 Have you tried using port 443, and adding This command will test it. You should get an error since a shell is not supported.
Then you can use a full URL to specify the project path, see Stack Overflow answer for details:
answered Dec 3, 2015 at 13:52
3 If you get a connection refused, it means you actually got a packet back which states that your destination does not accept your connection. This could mean a few things:
answered May 7, 2015 at 10:08
I am under a proxy and I am pushing in to git successfully for quite a while. asked Mar 23, 2013 at 17:13
Vihari PiratlaVihari Piratla 7,5004 gold badges20 silver badges26 bronze badges 8
For my case none of the suggested solutions worked so I tried to fix it myself and I got it resolved. For me I am getting this error on my AWS EC2 UBUNTU instance, what I did to resolve it was to edit the ssh config (or add it if it does not exist).
And I added the following
Then, run the command According to this
Hopefully this helps anyone else who's having the same issue I did. answered Oct 15, 2018 at 12:41
14 The reason could be the firewall modification as you are under a network.(In which case they may deliberately block some ports)
this should timeout. If that's the case use http protocol instead of ssh this way
change entry of
to
lantrix 4399 silver badges16 bronze badges answered Mar 23, 2013 at 17:13
Vihari PiratlaVihari Piratla 7,5004 gold badges20 silver badges26 bronze badges 10 inside the .ssh folder Create "config" file
answered Mar 13, 2019 at 19:32
4
Basic URL RewritingGit provides a way to rewrite URLs using git config. Simply issue the following command:
Now, as if by magic, all git commands will perform a substitution of source: git:// protocol blocked by company, how can I get around that?
answered Jan 29, 2014 at 6:19
Michaël PMichaël P 6275 silver badges3 bronze badges 4 I faced the same problem and couldn't find a working solution. I faced this problem while setting up a local server and the git couldn't connect
through my proxy network but my workstation could. This was the output when I ran the command
So I tried using an SSH connection made over the HTTPS port by editing the config file
Finally, I found this article which solved and exposed the real problem.
This is my config file and now git works perfectly well through ssh! answered Jul 21, 2019 at 14:10
4 Quick workaround: try switching to a different network I experienced this problem while on a hotspot (3/4G connection). Switching to a different connection (WiFi) resolved it, but it's just a workaround - I didn't get the chance to get to the bottom of the issue so the other answers might be more interesting to determine the underlying issue answered Sep 19, 2018 at 12:41
kip2kip2 5,9473 gold badges48 silver badges69 bronze badges 1 For me, the problem was from ISP side. The Port number was not enabled by the Internet Service Provider. So asked them to enable the port number over my network and it started working. answered Oct 13, 2020 at 12:11
AnuAnu 1552 silver badges3 bronze badges 1 Execute:
Your output should look like:
If you get:
You need to edit your ~/.ssh/config file. Add something like the following:
Dorian 21.3k8 gold badges117 silver badges114 bronze badges answered Nov 26, 2015 at 15:13
ameenameen 591 bronze badge 1 Ok Try this answered Dec 12, 2021 at 4:04
GokulGokul 12510 bronze badges 1 I was having this same issue, but the answer I found was different, thought someone might come across this issue, so here is my solution. I had to whitelist 2 IPs for port
In case these IP's don't work, it might be because they got updated, you can find the most current ones on this page. answered May 31, 2017 at 19:20
Artur GrigioArtur Grigio 4,8597 gold badges40 silver badges62 bronze badges 1 In a similar failure mode as Ludder, I was getting this error when I hadn't yet signed in to the correct company VPN. :facepalm: answered Apr 19, 2021 at 17:02
Mad BernardMad Bernard 3531 gold badge5 silver badges15 bronze badges The answer above gave me the information needed to resolve this issue. In my case the url was incorrectly starting with ssh:/// To check the url in your git config is correct, open the git config file :-
Check the url entry. It should NOT have ssh:/// at the start. Incorrect entry:
Correct entry:
If your url is correct, then the next step would be to try the answer above that suggests changing protocol to http. answered Apr 30, 2019 at 22:51
Changing the repo url from ssh to https is not very meaningful to me. As I prefer
answered May 10, 2020 at 22:49
The main reason was the change from the proxy installed by the company recently, which has blocked other ssh connections other than those to the company domain. I was able to connect successfully by following these steps:
It should end up in a timeout.
and from
to
The important point is that in the url you have to change at 2 places. from In the end verify by doing a answered Aug 25, 2020 at 7:15
Restart the computer solved it for me. answered Jul 12, 2020 at 3:04
Wenfang DuWenfang Du 6,4857 gold badges45 silver badges72 bronze badges In my case the problem was caused by a setting that I had changed on my Router a day before. So on my Router, I just had to revert the setting Isolation to disable and it has fixed my issue. answered Dec 30, 2021 at 10:53
user1941537user1941537 5,29713 gold badges46 silver badges81 bronze badges My computer was unable to connect port 22 while connecting to Github. I never had this issue with bitbucket. If you have both GitHub and bitbucket then
ref It basically connects SSH in 443 port instead of 22. answered Jan 9 at 9:34
ktakta 18.7k7 gold badges63 silver badges44 bronze badges This answer is based on the comment to the main question from @zundi (to whom credit should go, thanks zundi):
I do not know why temporarily connecting to a hotspot magically "kickstarts" the original network connection. answered Jun 6 at 15:20
AlainDAlainD 4,5583 gold badges37 silver badges83 bronze badges When I accidentally switched to a guest wifi network I got this error. Had to switch back to my default wifi network. answered Jun 7, 2019 at 20:18
LudderLudder 2,5151 gold badge24 silver badges24 bronze badges I had this issue for 2 hours and it turns out removing the "s" from https and just do:
Fixed it. answered Nov 28, 2019 at 10:51
aPurpleDevaPurpleDev 1171 silver badge12 bronze badges 2 ISSUE: Step to produce issue: git clone :sramachand71/test.git for the first time in the new laptop ERROR ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. SOLUTION for the first time in the system to clone we need to give double quotes for the clone command. $ git clone ":sramachand71/test.git" i face this issue in the system even after everything was correct but noticed at last that double quote is must for url "repository_url.git" for first time or new user in the system. answered Jan 27, 2020 at 16:54
I had this issue on a server of mine that was set up with it's regular IP and a failover IP. The failover IP did not point to the server at this time. I had to remove the failover IP from the server configuration in answered Sep 11, 2020 at 20:14
RobinRobin 3,3049 gold badges36 silver badges72 bronze badges Suggest to check the Internet connection or connect to another connection. answered Mar 28 at 11:18
1 So I was having this same problem (not behind a proxy) and came across this question. Here's what I did to fix it: Tried running To permanently fix this, I just added a line answered Apr 25 at 15:51
If you are in windows, move into the directory where you stored your ssh key, and try again, it worked for me. answered May 28 at 20:38
Refreshing my Internet connection and the git reload feature from the terminal worked for me. answered Jul 26, 2021 at 8:49
1 How do I SSH to a Git repository?Procedure. From the GitHub home page of the Git repository, click the Clone or download button to get the SSH Git repository URL. A Clone with HTTPs window opens.. On the Clone with HTTPs window, click the Use SSH link. The Clone with SSH window displays.. On the Clone with SSH window, you can see the SSH information.. How do I clone using SSH?Find GitHub's SSH URL & Git Cloning!. Create an SSH keypair on your Windows or Linux OS.. Copy the value of the public SSH key to your GitHub account.. Obtain the GitHub SSH URL for the repository to be cloned.. Using Git, clone from GitHub with the SSH URL.. How do I create a SSH key in GitHub?Adding a new SSH key to your account. Copy the SSH public key to your clipboard. ... . In the upper-right corner of any page, click your profile photo, then click Settings.. In the "Access" section of the sidebar, click SSH and GPG keys.. Click New SSH key or Add SSH key.. How do I fix ssh connect to host port 22 connection refused?How To Fix Port 22: Connection Refused Error. Verify Login Credentials.. Resolve DNS Issues.. Ensure SSH is Installed.. Check SSH Daemon Status.. Check SSH Listening Port.. Allow SSH in Firewall.. Ensure IP Is Whitelisted.. |