Trying to push change back to github - "Please tell me who you are"

I’m trying to put together a CircleCI job that updates a version number as part of the build and pushes the version number back to the source repository. The relevant section of config is:

  - deploy:
      command: |
        [trimmed]
        if [ "${CIRCLE_BRANCH}" == "master" ]; then
          [change file representing version]
          git add .
          git commit -m "${TAG}"
          git push origin $CIRCLE_BRANCH

I get the following in the log when running:
*** 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: empty ident name (for <(null)>) not allowed
Exited with code 128

I’ve got an appropriate read/write user key to github configured for the project. Ideas about what to do?

1 Like

A workaround that works - seems obvious now but it took a while to get there: set the user.email and user.name in the config.yml file. It shouldn’t need to work like that - all of my other projects it’s provided directly by the integration. So still something is not right, but I’m not stuck.

I was also able to get around this by setting the EMAIL, GIT_AUTHOR_NAME, and GIT_COMMITTER_NAME environment variables.

2 Likes