fatal: unable to look up current user in the passwd file: no such user


If you get this error ‘fatal: unable to look up current user in the passwd file: no such user‘ when run git command in a pod on OpenShift. Then try to to set up two environment variables as below. This worked for me. The reason could be that on OpenShift, the users are not in the /etc/passwd file but just a random UID.

GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL

6 thoughts on “fatal: unable to look up current user in the passwd file: no such user

      1. I can confirm this works, but name/email must directly match your account settings and it is case sensitive.

  1. This didn’t work for me using git version 1.8.3.1 on an image based on openshift/base-centos7. I got around it by supplying the details to git:

    git -c user.name=git-bug-workaround -c user.email=not@used.com commit

Leave a reply to Oliver Roe Cancel reply