Git pull during checkout randomly fails

I am having a rough time trying to get my CI process to pull a branch from another private repository. Permissions are set up with GitHub user keys and through the command

git pull git@github.com:myuser/myproject.git my-branch

I am able to start the pull process… SOMETIMES.

Sometimes this command fails in CircleCI, with a git message about setting my name and email address through git config:

Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.

From github.com:myuser/myproject
 * branch            my-branch -> FETCH_HEAD

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'ubuntu@box128.(none)')

Sometimes this message does not occur. I can find no pattern. If I follow the directions and add the commands, I will always bet past this step… but other issues follow.

Sometimes this command starts but never completes. I get this output in CircleCI:

Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.

From github.com:myuser/myproject
 * branch            my-branch -> FETCH_HEAD

command git pull git@github.com:myuser/myproject.git my-branch took more than 10 minutes since last output

After the aforementioned 10 minutes, the build automatically fails.

I get variations of this error whether I use git pull or git fetch into git merge.

Finally, SOMETIMES the whole process actually works. I can find no pattern to any of these occurrences. The git pull is in my circle.yml under checkout-post.

What am I missing?

1 Like

Also seeing the same issue when using git pull - weirdly seems to work every time in one branch, but fails every time in a different branch (which is a mirror of the branch that works…)

Hoping there is a solution to this.

Same problem here, just came up. I’ve had to fix things up a bunch of times now :frowning: