Hi,
I ran into this problem: $ git annex mirror --from origin git-annex: getUserEntryForID: does not exist (no such user)
I found in the forum that, if the the machine uses LDAP etc. I should be able to use the HOME and USER environment variables.
I'm not quite sure what the user authentication management on the machine I'm on is and I'd rather not deal with the sysadmins. But I know that the /etc/passwd file does not have my user listed. I do have the the HOME and USER variables properly set and exported.
$ echo $HOME $USER /nethome/iiossifov iiossifov
In the git-annex source code I found that the error occurs in Utility/UserInfo.hs. I can't read Haskell but my guess is that the problem is with the myUserGecos for which there is no environment variable fall back.
I'm using the pre-build git-annex version: 6.20160527-gb7d4774
Would you be able to advice me how to deal with the problem?
Thank you, Ivan
IIRC it's supposed to be possible to configure a system such as LDAP so that
getpwuid
queries it, instead of failing as it seems to on your system, using/etc/nsswitch.conf
. But I'm not sure about that or how to do it and you'd need to be the admin of the system.git-annex has three calls to
getpwuid
(aka getUserEntryForID). In two of them it first looks at commonly set environment variables (HOME and USER/LOGNAME) and only uses
getpwuid` as a fallback. It seems reasonable to crash when git-annex can't determine the user's home directory or username in code that needs it, especially since all three environment variables are almost always going to be set.The third use is a GECOS lookup, and here there's no corresponding environment variable and git-annex can deal without knowing the full name of the user. So, I've made that not crash if
getpwuid
fails.(There's also a little-used code path where
getpwnam
is used to expand~
in a git remote path. Seems best to leave this crashing too if used on a system that does not have a workinggetpwnam
.)So, you can try upgrading to an autobuild that has the fix, and if it still crashes, check that HOME and USER are set.
Hi Joy,
Thanks a lot for the quick reply! It's seems that's exactly what will solve my problem. But, I couldn't find how to download the latest autobuilds. Would mind pointing me to it?
Thanks again, Ivan
The June 13th release of git-annex included the fix for this problem.
The Windows autobuild is linked to from http://git-annex.branchable.com/install/Windows/