Git clone inside travis container failed

Hi, I’m trying to follow this link to make a local travis ci container for testing. Somehow when I try to applying the same git clone to local docker container the following error shows.

git clone command run on travis:

error shown locally running the same git clone:

travis@74bcb9396833:~/builds$ git clone --depth=50 --branch=master https://github.com/clicktherapeutics/ct152-mobile.git clicktherapeutics/ct152-mobile
Cloning into ‘clicktherapeutics/ct152-mobile’…
Username for ‘https://github.com’: guanw
Password for ‘https://guanw@github.com’:
remote: Enumerating objects: 2238, done.
remote: Counting objects: 100% (2238/2238), done.
remote: Compressing objects: 100% (1355/1355), done.
remote: Total 2238 (delta 985), reused 1994 (delta 854), pack-reused 0
Receiving objects: 100% (2238/2238), 663.66 MiB | 19.10 MiB/s, done.
Resolving deltas: 100% (985/985), done.
error: Unable to create ‘/home/travis/builds/clicktherapeutics/ct152-mobile/.git/refs/remotes/origin/HEAD.lock’: No such file or directory
fatal: unable to update refs/remotes/origin/HEAD

Any idea why?