I have used VPN in my Mac to access the internet.
When I tried to git clone a repo from github.com via command line, I got the following error:
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.
The connection timed out.
I thought it was a VPN issue, thus I disabled the VPN and tried again. This time, I was able to git clone the repo.
I also tried to git clone the repo via GitHub.app in VPN environment.(GitHub.app is an application for Mac users to use GitHub easily. Here is the download link: https://mac.github.com/) This time, I was able to git clone the repo too.
Here are my questions:
- Is VPN the root cause of the problem? If it was VPN that blocked my git requests from command line, why it did not block git requests from GitHub.app?
- If VPN is the root cause, why?
I have searched in Stack Overflow for similar questions. Here is what I have found:
However, the answers to this question simply suggested "route traffic to github back over your Ethernet (I assume) interface rather than over the VPN".I believe this would work, but still I don't know why VPN may cause this problem.Besides, why GitHub.app worked in VPN environment is a puzzle.
Any help you can provide will be greatly appreciated.
Thx.