ioBroker.node-red
ioBroker.node-red copied to clipboard
Problems with project function in adapter 2.0.0
Since update of the adapter, it seems that the git settings are no longer available and I cannot write specific states of my flows.
A dialogue says that an unexpected error has occurred and I need to specify the git user settings in node red globally.
Screenshots are available in my thread in the iobroker forum: Node-Red 2.0.0 - keine Systemobjekte u. andere Probleme
Same issue here. When comitting, I get the error:
Your Git client is not configured with a username/email.
although it is. My second NR instance v1.1.2 is working. Log shows nothing also on debug setting
Any news?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.
The problem still exists!!!! (see here in German - in iobroker Forum)
When I manually create the .gitconfig file under the iobroker user, the feature seems to work fine. I'm not sure why it has been working fine in previous versions.
So for all - with the great help of @bjoernbusch this issue can closed - with the following workarround:
Here a short description how a .gitconfig file can be created.
sudo -su iobroker
git config --global user.email "mail@maildomain"
git config --global user.name "name"
Many thanks to you @bjoernb. I waited for this solution since several months - and that someone comprehends this issue.
.gitconfig file looks like this
[user]
email = mail@maildomain
name = name
I reopened - as I guess that the project function should be fixed in general - even if the solution above works perfect.
How we should fix it? I'm not sure that it makes sense that we initialize a git thing, or!?
Anyone has a proposal?
I do not really know what is going wrong but on a bare metal Node-Red when creating a project following happens:
- A git repository is initialized and the flow is copied to the git folder
- the file
.config.users.jsonis modified in the.node-redfolder, which contains the gitemailandname
.config.users.json
{
"_": {
"editor": {
"view": {
"view-grid-size": "20",
"view-node-status": true,
"view-show-tips": true,
"view-snap-grid": true,
"view-show-grid": true,
"view-node-show-label": true
},
"context": {
"flowRefresh": false
}
},
"menu-deploymenu-item-flow": false,
"menu-deploymenu-item-full": true,
"git": {
"user": {
"name": "Sineos",
"email": "[email protected]"
}
}
}
}
So usually no intervention should be needed.
The solution is in my opinion "simple" - so I do not know if it simple or not. ;) Before version 2 the git configuration seems to be not relevant or a standard config was used - whatever this means (empty name and email).
Since version 2 it is necessary to specify git user name and email. If modifying the .config.users.json will solve the problem as well I cannot confirm, but what definetly helped was the actions posted on 3rd of February.
The solution should work when the dialogue is filled out.
So with version 2 and activation of the project function caused the following error:
An unexpected error has occurred - specify the git user settings in node red globally.
So I switched to the global dialog and filled out name and email - but the problem still remains until @bjoernbusch helped me. :)

And the solution should be:
If I fill out this dialogue then either .config.users.json file should be modified ( I never tested that) - or what works for me is that the 2 commands
git config --global user.email "mail@maildomain"
git config --global user.name "name"
will be executed or the appropiate .gitconfig file (see posting 3rd Feb.) in the /home/iobroker directory is created.
At the moment filling out the dialogue - is either not executed or does not perform the appropiate actions.
Still exists. Synology DS918+, iobroker as Docker with this adapter.
https://github.com/ioBroker/ioBroker.node-red/issues/117#issuecomment-772557066 helped me, I used UI to create a "bash terminal" and then run the three commands. After that, it worked fine.
Ok I found the config.users.json. In iobroker it seems that the file is located under: /opt/iobroker/iobroker-data/node-red
It seems that the git entries are empty in this file.
I tried to recreate this error, but seems not be possible, if it works once.
So solution may be is either executing the commands when the dialogue is opened or to change the git settings in the config.users.json file under /opt/iobroker/iobroker-data/node-red
SI in fact would be more a topic for the readme on "how to set up manually"?
Hmm I do not really understand - why it is not possible to execute both commands when the dialogue is filled out by the user or the .gitconfig file is created. If this is not possible as original Node Red Code has to be rewritten - then for sure it needs to be a note somewhere how to enable the project function. In this case the necessary steps can be linked into the Node-Red adapter configuration near the option to enable the project function.
In this case in my opinion it would be the best way - if a user activates the project function in the adapters config

Both fields could be made available in the adapter config page as well

Then if the adapter config is committed both github commands can be executed:
git config --global user.email "mail@maildomain" git config --global user.name "name"
In this case the dialogue in NodeRed remains still empty - but to use the project function without errors the necessary .gitconfig file is created in the iobrokers home directory:
