Codes from my life

using GIT behind proxy

GIT is another software used for version control as SVN or CVS. Today when I was at gym Shreyank requested me to find out a possible solution for using GIT as he saw what I had posted earlier to use SVN and Pidgin. He was really very happy to see Pidgin working.

I came back then I thought I should give it a try too. I visited the LDTP site. There I saw a link for using git behind proxy. I dont know how it worked for me. I simply noticed that there was a simple change of protocols while using proxy, git:// was changed to http://.This is what I used to download the source of LDTP

$git clone http://anongit.freedesktop.org/git/ldtp/ldtp.git

I tried and bang! it was working for me. I had done only the usual proxy setting form yast, it sets up the http_proxy Environment variable. Check if it is set for you.

$echo $http_proxy

If the output is not “http://10.0.0.1:3128″ then the proxy setting is not done for you. Do this

$export http_proxy=”http://10.0.0.1:3128″

It should work for you also.

Cheers :)

About these ads

Comments on: "using GIT behind proxy" (17)

  1. Thanks for the information. Your blog is added to your bookmarks. Develop.
    Your reader.

  2. Your guide will not work in 2 cases

    a)If the repo has no webview enabled.. ie. NO HTTP
    b)If the proxy blocks the port used by git like ours does :)

  3. Thanks Roshan, exporting the env variable “http_proxy” worked for me :)

  4. Thank you very much!

  5. [...] I decided to change my search query to Google, and guess what? I found the answer!! Thanks to link and this [...]

  6. Clearly as Karthik mentioned, your solution wouldn’t work if there is no web view of the repo through http protocol.

  7. @Karthik was right ..

    i can use git here .. :(

  8. git honors the http_proxy env variable and allows to connect via it. if the proxy blocks ports other than 80 (www), you might have success with the git HTTP protocol (if the server has that setup).

  9. Zubin Mithra said:

    git can use 3 protocols ; http, git or ssh. outgoing http traffic is not blocked by most proxy servers, thats why it worked.

  10. Export of http_proxy works, but only if no user authentication is required. What to do if user authentication is required on my proxy server??

  11. [...] using GIT behind proxy This entry was posted in sysadmin and tagged Desarrollo. Bookmark the permalink. ← FTP auto-login [...]

  12. There is a typo in the article:

    “””If the output is not “http;//10.0.0.1:3128″ then the proxy setting is not done for you. Do this”””

    http;// should be http://

  13. Arun Abraham said:

    Thanks a lot… this helped me a lot while i was using this script (https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh) to install scipy… :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: