curl fails on OS X with SHA1 mismatch I'm experiencing problems with homebrew in OS X 10.10.2 and it seems that curl is causing them:

brew install gdal
==&gt; Installing dependencies for gdal: giflib, lzlib, proj, libgeotiff, ge
==&gt; Installing gdal dependency: giflib
==&gt; Downloading https://downloads.sf.net/project/machomebrew/Bottles/giflib-4.1.
######################################################################## 100.0%
Error: SHA1 mismatch
Expected: 4900c1066c954c77f0590d954a6f8a6b77f55cec
Actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b
Archive: /Library/Caches/Homebrew/giflib-4.1.6.yosemite.bottle.2.tar.gz
To retry an incomplete download, remove the file above.
Warning: Bottle installation failed: building from source.
==&gt; Downloading https://downloads.sourceforge.net/project/giflib/giflib-4.x/gifl
######################################################################## 100.0%
Error: SHA1 mismatch
Expected: 22680f604ec92065f04caf00b1c180ba74fb8562
Actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b
Archive: /Library/Caches/Homebrew/giflib-4.1.6.tar.bz2
To retry an incomplete download, remove the file above.


Somehow curl creates files that are way too small:

ls -al /Library/Caches/Homebrew/
total 16
drwxrwxr-x   5 root    admin  170 Feb 10 20:57 .
drwxrwxrwt  15 root    admin  510 Feb 10 20:46 ..
drwxr-xr-x  24 xxxxxx  admin  816 Feb 10 20:57 Formula
-rw-r--r--   1 xxxxxx  admin  635 Feb 10 20:57 giflib-4.1.6.tar.bz2
-rw-r--r--   1 xxxxxx  admin  635 Feb 10 20:57 giflib-4.1.6.yosemite.bottle.2.tar.gz


Any thoughts?

Edit 1:

I have tried https://apple.stackexchange.com/a/60223 but that didn't work.

which curl
/usr/local/bin/curl


Path:

$PATH
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/xxxxxx/.rvm/bin:
Sourceforge is down, try later. I'm almost 100% positive that this is what is causing the problem.