Wednesday, September 15, 2010

Git on Windows behind proxy

I am working begind proxy at work and at home. So setting up some tools could be somewhat tricky especially at work due to very strict filtering policy.

To use git@github I've tried to use git on windows and finally ended up using Ubuntu inside VirtualBox with shared folder to commit and push to github. This is crazy setup =)

Today, finally had some time to getting things running at home using https protocol to github. Project I am working on initially developed with NetBeans and use GuiBuilder, so I've installed nbgit for NB 6.9 ( It has very limited set of git commands. I tried TortoiseGit in addition, but it failed to push for unreported reason. If you have same issue you could try following solution(works for me=))
  1. Install git for windows from Git- in my case
  2. Launch Git Bash and go to your git repo folder.
  3. Set https proxy.

    export https_proxy=https://host:port
    git config --global http.proxy http://host:port
  4. Update global git config to fix ssl verification error.

    error: error setting certificate verify locations:
    CAfile: /bin/curl-ca-bundle.crt
    CApath: none
    Fix for this:

    git config --global http.sslverify false 
    git config --system http.sslcainfo \bin\curl-ca-bundle.crt
  5. Now you can push you changes to origin

    git push origin master

1 comment:

Ken Tsang said...

Thanks for your blog, I managed to publish some C# projects using the advice given here. GitHub now have a much easier way to integrate with windows using their app downloadable here -