Git – Cloning and pushing via https (Linux and Windows)

Unfortunately the Eclipse team provider EGit does currently not support to use HTTPS for cloning and pushing.

Fortunately the Git command line supports this (under Linux without problems).

git clone https://vogella@github.com/vogella/de.vogella.rcp.example.git

// do some changes

git push https://vogella@github.com/vogella/de.vogella.rcp.example.git

If you are on Windows and if you are using msysGit then you may receive the following error:

error: error setting certificate verify locations:

CAfile: /bin/curl-ca-bundle.crt

CApath: none

while accessing your_repo

If you have this error you can disable ssl verification to solve it.

git config --global http.sslverify "false"

After this change cloning and pushing works via https on Windows.

Alternative the following should also make msysGit work, but I didn’t test these approaches.

copy C:\Program Files\Git\bin\curl-ca-bundle.crt to c:\bin\curl-ca-bundle.crt

or

git config --system http.sslcainfo \bin/curl-ca-bundle.crt

The full discussion of the msysGit issue can be found here.

[Update:] If you are behind a http proxy you can set the proxy via the following command:

git config --global http.proxy http://proxy:8080

// To check the proxy settings

git config --get http.proxy

1 comment on this post.
  1. Dean Povey:

    Thanks this was a big help, I have been swearing at this for at least an hour :-)