Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone
of a repository over HTTP.
I have
Just to post this as it is the first result on Google, this blog post I found solves the problem for me by updated the curl certificates.
http://www.simplicidade.org/notes/archives/2011/06/github_ssl_ca_errors.html
On Windows, if you don't want to put your password in .gitconfig in the plain text, you can use
It authenticates you against normal or even Windows NTLM proxy and starts localhost-proxy without authentication.
In order to get it run:
Point git to your new localhost proxy:
[http]
proxy = http://localhost:3128 # change port as necessary
It looks like you're using a mingw compile of Git on windows (or possibly another one I haven't heard about). There are ways to debug this: I believe all of the http proxy work for git is done by curl. Set this environment variable before running git:
GIT_CURL_VERBOSE=1
This should at least give you an idea of what is going on behind the scenes.
What finally worked was setting the http_proxy
environment variable. I had set HTTP_PROXY
correctly, but git apparently likes the lower-case version better.
Worth to mention: Most examples on the net show examples like
git config --global http.proxy proxy_user:proxy_passwd@proxy_ip:proxy_port
So it seems, that - if your proxy needs authentication - you must leave your company-password in the git-config. Which isn't really cool.
But, if you just configure the user without password:
git config --global http.proxy proxy_user@proxy_ip:proxy_port
Git seems (at least on my Windows-machine without credentials-helper) to recognize that and prompts for the proxy-password on repo-access.
There's some great answers on this already. However, I thought I would chip in as some proxy servers require you to authenticate with a user Id and password. Sometimes this can be on a domain.
So, for example if your proxy server configuration is as follows:
Server: myproxyserver
Port: 8080
Username: mydomain\myusername
Password: mypassword
Then, add to your .gitconfig
file using the following command:
git config --global http.proxy http://mydomain\\myusername:mypassword@myproxyserver:8080
Don't worry about https
. As long as the specified proxy server supports http, and https, then one entry in the config file will suffice.
You can then verify that the command added the entry to your .gitconfig
file successfully by doing cat .gitconfig
:
At the end of the file you will see an entry as follows:
[http]
proxy = http://mydomain\\myusername:mypassword@myproxyserver:8080
That's it!