Node-RED projects not recognizing git command

I installed Node-RED in Ubuntu using snap and I can't enable Projects, because it is not finding the git command even though I have git and ssh-keygen installed.

Also, I have also configured my git client with user.name and user.email, but it does not recognize the command anyway.

These are the debug lines on startup:

NOW STARTING NODE-RED : /snap/node-red/675/bin/node-red -u /home/gabrielmd/snap/node-red/675 on port 1880
28 Aug 19:59:36 - [trace] git["--version"]
28 Aug 19:59:36 - [trace] git["config","--global","user.name"]
28 Aug 19:59:36 - [trace] git["config","--global","user.email"]
28 Aug 19:59:36 - [trace] git init: git not found
28 Aug 19:59:36 - [info] 

Welcome to Node-RED
===================

28 Aug 19:59:36 - [info] Node-RED version: v1.2.9
28 Aug 19:59:36 - [info] Node.js  version: v10.23.3
28 Aug 19:59:36 - [info] Linux 5.8.0-1038-gcp x64 LE
28 Aug 19:59:36 - [info] Loading palette nodes
28 Aug 19:59:37 - [debug] Module: node-red-node-ping 0.2.2
28 Aug 19:59:37 - [debug]         /snap/node-red/675/lib/node_modules/node-red-node-ping
28 Aug 19:59:37 - [debug] Module: node-red-node-random 0.3.1
28 Aug 19:59:37 - [debug]         /snap/node-red/675/lib/node_modules/node-red-node-random
28 Aug 19:59:37 - [debug] Module: node-red-node-rbe 0.2.9
28 Aug 19:59:37 - [debug]         /snap/node-red/675/lib/node_modules/node-red-node-rbe
28 Aug 19:59:37 - [debug] Module: node-red-node-serialport 0.11.1
28 Aug 19:59:37 - [debug]         /snap/node-red/675/lib/node_modules/node-red-node-serialport
28 Aug 19:59:37 - [debug] Module: node-red-node-tail 0.1.1
28 Aug 19:59:37 - [debug]         /snap/node-red/675/lib/node_modules/node-red-node-tail
28 Aug 19:59:37 - [info] Settings file  : /home/gabrielmd/snap/node-red/675/settings.js
28 Aug 19:59:37 - [info] Context store  : 'default' [module=localfilesystem]
28 Aug 19:59:37 - [info] User directory : /home/gabrielmd/snap/node-red/675
28 Aug 19:59:37 - [warn] Projects disabled : git command not found
28 Aug 19:59:37 - [info] Flows file     : /home/gabrielmd/snap/node-red/675/flows.json
28 Aug 19:59:37 - [info] Creating new flow file
28 Aug 19:59:37 - [debug] loaded flow revision: d751713988987e9331980363e24189ce
28 Aug 19:59:37 - [debug] red/runtime/nodes/credentials.load : no user key present
28 Aug 19:59:37 - [debug] red/runtime/nodes/credentials.load : using default key
28 Aug 19:59:37 - [debug] red/runtime/nodes/credentials.load : keyType=system
28 Aug 19:59:37 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

28 Aug 19:59:37 - [trace] runtime event: {"id":"runtime-state","retain":true}
28 Aug 19:59:37 - [trace] runtime event: {"id":"runtime-deploy","payload":{"revision":"d751713988987e9331980363e24189ce"},"retain":true}
28 Aug 19:59:37 - [info] Starting flows
28 Aug 19:59:37 - [debug] red/nodes/flows.start : starting flow : global
28 Aug 19:59:37 - [trace] [flow:global] start flow [global]
28 Aug 19:59:37 - [trace] runtime event: {"id":"runtime-state","retain":true}
28 Aug 19:59:37 - [info] Started flows
28 Aug 19:59:37 - [info] Server now running at http://127.0.0.1:1880/

Does anybody have an idea about how to solve this?

You could always install node-red outside of snap. The raspberry pi script works perfectly well on Ubuntu and installs everything you need.

As the readme says, the snap environment is severely restricted, so indeed you can't see outside of the container to other programs and hardware ports. If you want full functionality you need to use the full install (and remove the snap)

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