It looks like not having (lib)curl-devel installed when you compile git can cause this.
If you install (lib)curl-devel, and then rebuild/install git, this should solve the problem:
$ yum install curl-devel
$ # cd to wherever the source for git is
$ cd /usr/local/src/git-1.7.9
$ ./configure
$ make
$ make install
This worked for me on Centos 6.3.
If you don't have yum, you can download the source to curl-devel here:
If you are running Ubuntu instead:
sudo apt-get install libcurl4-openssl-dev
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…