Stdin: is not a tty and other GIT problems when git clone

stdin: is not a tty
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
remote: Counting objects: 7844, done.
error: git upload-pack: git-pack-objects died with error.
remote: fatal: Out of memory, calloc failed
remote: fatal: Out of memory, calloc failed
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed


if [ $(expr index "$-" i) -eq 0 ]; then
    return
fi

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

http://webhostingneeds.com/Git_stdin_is_not_a_tty