4

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:

  1. 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?
  2. If VPN is the root cause, why?

I have searched in Stack Overflow for similar questions. Here is what I have found:

git push/pull times out

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.

Community
  • 1
  • 1
PiggyWarrior
  • 41
  • 1
  • 3

1 Answers1

1

For me - Whenever I connected to VPN using the OS X built in VPN, all my internet traffic was disconnected.

OS X 's built-in VPN allows you to route your entire network traffic over the VPN connection (checkbox in the VPN configuration's option tab).

First - Ensure that this checkbox is off.

Next - switch over to the TCP/IP tab and switch to manual IP configuration: - Define your IP and your router (copy from the automatic state) Define a subnet mask which will divert only the specified subnet traffic into the VPN - Usually 255.0.0.0This should work fine if your VPN subnet and your LAN reside on different subnets (e.g. 10.x.x.x and 192.168.x.x)

That solved the problem for me. Hope this helps.

roy650
  • 633
  • 1
  • 10
  • 18