Curl Initialization error with git pre-push hook

I created a git pre-push hook to check the commits being pushed.
One of the validation steps fetches some data using cURL for validating the commit. On running git push, cURL fails to initialize with error

curl: (2) Failed initialization

The pre-push hook has the correct permissions (-rwx——). To narrow down the problem I removed everything from the script except the cURL command and I am able to reproduce the error with a very simple script

/usr/bin/curl ""

The script works as expected when run standalone.

Additional details:

i. Git already added to path

ii. Curl version: curl 7.24.0 (x86_64-redhat-linux-gnu)

I would really appreciate any help on this.

Git Baby is a git and github fan, let's start git clone.