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

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, With more than one million visitors per month his website vogella.com is one of the central sources for Eclipse and Android programming information.
This entry was posted in Eclipse and tagged , . Bookmark the permalink.

One Response to Git – Cloning and pushing via https (Linux and Windows)

  1. Dean Povey says:

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

Comments are closed.