# Git commit author in Project mode - Query

**URL:** <https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899>\
**Category:** General\
**Created:** [15 March 2022 19:57 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899 "2022-03-15T19:57:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [15 March 2022 19:57 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/1 "2022-03-15T19:57:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [15 March 2022 21:03 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/2 "2022-03-15T21:03:38Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/7/27ed856f5e7f41dffc804128c40e88c55beb54b8.png)

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

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [16 March 2022 05:25 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/3 "2022-03-16T05:25:07Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [18 March 2022 14:58 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/4 "2022-03-18T14:58:57Z")

</div>

Any clues ? Anyone ? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 March 2022 15:55 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/5 "2022-03-18T15:55:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [18 March 2022 17:14 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/6 "2022-03-18T17:14:16Z")

</div>

> [@knolleary](#):
>
> I assume you are running as the same system user before/after making those adminAuth changes?

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 May 2022 17:15 UTC](https://discourse.nodered.org/t/git-commit-author-in-project-mode-query/59899/7 "2022-05-17T17:15:04Z")

</div>

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