You don't exist, go away!

Today I tried to push my latest changes from a git repo on my laptop to a remote repo and got the following output:

moe:~/dev/ihg/endeavor-stats-analyzer 
danap$ git push
You don't exist, go away!
fatal: The remote end hung up unexpectedly

I did some googling and found that it might have something to do with SSH not being able to find out what user I am. So I looked in /etc/passwd file and could not find my user! I use a Mac OS X 10.7.0 system so I was not terribly alarmed. Of course the “it just works” operating system would keep my user information in a place other then the standard Unix location. There was a comment in the file stating that most user information was stored in opendirectory. So I did a “ps -ef | grep opendirectory” and I found the process. So figuring it was managed and watched by launchd, I killed it. That worked. I was able to SSH again.

So whenever you are accused by your Mac OS X system that “You don’t exist” and are commanded to “go away” try killing opendirectory. That might just do the trick.