Git commit author in Project mode - Query

Hi ,

Where does NR take the details of Author for Project commit.
I see a very interesting behaviour.

  1. I do not have adminAuth enabled in settings.js. I do changes and commit. Git shows the Author as Node-RedSA and my personal email ID.
  2. I enabled adminAuth in settings.js. My user is "admin". Now when i do changes and commit, Git shows Author as details of my work email ID.

So just wondering how does NR derive the Author details for Git.

It either uses the values you gave it when you setup projects originally - which can also be edited via the 'Git config' tab of User Settings:

Or it will fall back to whatever your git client's defaults are set to.

@knolleary - in my case i have not yet using Committer Details.
But how does one explain - what is being used when adminAuth is enabled vs. not enabled. I would assume in case of defaults it should be same in both cases.

Any clues ? Anyone ? Thanks in advance.

I assume you are running as the same system user before/after making those adminAuth changes?

Have a look in ~/.node-red/.config.users.json. The contents is a JSON Object, with the top level key being the adminAuth user... with _ used for the case when adminAuth isn't enabled.

Under each user should be a git section - under that will be globalUser and user. Does that correlate at all with what you see?

Yes. This is correct. I am on the same system.

I checked the ~/.node-red/.config.users.json .

For _ - The git user does correspond to what i see when adminAuth is disabled.
For admin - The git user/pass is empty in config.users.json - so i assume it takes it from git configuration. The strange part now is when i do git config --list ... i dont see any name and email.

I continue to check.

Thanks Nick for guiding me to the correct direction.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.