2

I'm a frequent github user, but when I'm on my school's network (I live off campus), it won't let me push it. I have a vague belief that this is due to using the git protocol, instead of HTTPS, but am not positive.

I'd appreciate any insight as to ways around this!

Connor
  • 3,958
  • 6
  • 31
  • 49
  • do you use another machine when on school's network or the same? – Headshota Feb 20 '12 at 06:45
  • As far as I know, Github forces you to use ssh for pushing. You can ask the network administrators at your school to open port 22 for your computer, specifically to github.com. If they're nice they'll take down your computer's MAC address and open the port for you. It worked for me and it's the simplest solution if it works. – Robert Rouhani Feb 20 '12 at 07:17
  • @RobertRouhani don't. Use https. – VonC Feb 20 '12 at 07:39

2 Answers2

2

It might be firewall issues, but https should mostly be accessible. Note that git protocol is read only, you can't push to it anyway. Try changing origin URL to the https one ( github has three protocols - ssh, https and git ):

git remote set-url origin http://github.com/user/repo.git
manojlds
  • 259,347
  • 56
  • 440
  • 401
2

I confirm that the git protocol, using a non-standard 9418 port is often blocked.

git+ssh might work but outgoing ssh access are often blocked as well.

So http remains your only option, using smart http, as described in "Cannot get Http on git to work".
You can use a git remote --set-url command to update your origin URL.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283