11

I really want to use GitHub, but my company has everything locked down. Now, I can only use Tortoise SVN through the HTTP protocol. Can I use GitHub the same way? If so, how?

user229044
  • 232,980
  • 40
  • 330
  • 338
Andres
  • 5,002
  • 6
  • 31
  • 34

2 Answers2

16

I think you've always been able to clone github repositories over HTTP, but with the restriction that you couldn't push back to them. However, github have recently introduced the Smart HTTP transport, so now you can also push over HTTPS. This should work fine from behind any firewall. There's more on the Smart HTTP support in this blog post:

https://github.com/blog/642-smart-http-support

To give a short summary - if you click the HTTP button on the "Source" tab of a repository, it'll give you a URL like:

https://mhl@github.com/mhl/unicode-poster.git

If you clone with that URL, it'll prompt you for your github password whenever you need to communicate with the server (e.g. with git clone, git fetch, git push, etc.) However, you can also clone using a URL like:

https://mhl:notactuallymypassword@github.com/mhl/unicode-poster.git

... and you won't need to re-enter your password. (As that blog post mentions, make sure you've got https:// at the start of the URL, and be aware that this means that your github password will be stored in plaintext in your git config, so don't let anyone copy your .git directory!)

Mark Longair
  • 446,582
  • 72
  • 411
  • 327
  • You might also need to add your corporate proxy address into the configuration. For example, to use git bash on Windows, the relevant section of my gitconfig file looks like this: ` [http] sslCAinfo = /bin/curl-ca-bundle.crt proxy=http://mycache:8080 ` This file is at C:\Program Files (x86)\Git\etc (or similar)' – Tom Crane Sep 19 '13 at 16:05
1

According to https://github.com/blog/92-http-cloning, you can clone from github over http.

Another post in this thread gives a good pointer on pushing.

gahooa
  • 131,293
  • 12
  • 98
  • 101