I have a project linked to a private GitHub repository, for which I added a Deploy key to build on Linux.
Builds were running fine until I committed a minor change (definitely not impacting the build). The build “timed out” and hung at the “Checkout using deploy key” step.
The message I get is:
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
command if [[ -e /home/ubuntu/reponame/.git ]]; then git fetch --force;else
rm -rf /home/ubuntu/reponame
mkdir /home/ubuntu/reponame
cd /home/ubuntu/reponame
git clone --quiet git@github.com:username/reponame.git . --config core.compression=9 --depth 10 --no-single-branch
fi && true && git reset -q --hard commitsha && git checkout -q -B 'master' commitsha && git reset -q --hard commit_sha took more than 30 minutes to run
git checkout cancelled
What I’ve tried so far:
Removing the deploy key and creating a new one (repo side / circle side)
Checking out at the working build commit and triggering a new build
I ended up creating a new repository (different name) and copying the original repository content (without the git) and the build succeeded. I had to do a backup of the original repository with the git since I didn’t want to lose the history.
I guess there is a better way but it’s the only one that worked.
By the way, I also tried debugging via SSH and I got the message ‘Clone succeeded, but checkout failed’.
I am experiencing this, and I thought it might be git-lfs related.
It turns out (upon ssh’ing in to test) the git reset --hard SHA was hanging, which is consistent with the git-lfs problem noted here: https://stackoverflow.com/q/44986734/19212