Auto-Pull GitHub project (API / CLI...)


It's possible to use Node Red API to execute a project pull ?
My idea would be to have a recurring task that performs a pull of my Git project every day for exemple.

Thanks for your help.

Are you aware of this: Projects : Node-RED

You could do it in an exec node.
Note that if there are any changes you will need to restart node-red.

Do you have an exemple of this ?

An example of what?

A flow exemple.
But okay, I understand. I think you use Linux commands to do this (git pull).

Yes, git pull will fetch the latest from the repository. You will have to cd into the relevant directory first, so the command may be something like
cd /home/me/.node-red && git pull

1 Like

I've tested it, and okay, it works, but there are a problem. On reboot, I lose connection to GitHub. The solution was to create a 'git config credential.helper store,' but I'm not very fond of this solution.

Set your repository up to use ssh keys.

1 Like

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