Hi there,
As I use node red within quite a couple of devices already I’m looking for a good guide, how to setup node-red projects, with github.
And somehow my regular info source YouTube let me down on this. However, does anyone have a good tutorial, how to setup the feature from scratch?
I followed the video. Thanks for the link.
One thing I was missing in the video: how to create a new empty repository with node red flows.
Not cloning a repository but how to start from scratch.
I was able to try and error it out.
basically I made everything the same till the setup of the git remote. For the remote I created a new GitHub repository.
then, when the last “new button” appears according tho the video, (arrow up arrow down button)… when I tried to push the code, it asked me for a branch… I just typed master and whoops, it worked
maybe this could be part of a how to if you ever do one again, otherwise, if someone else has similar problems here is now the hint
I created an empty repository and copied the SSH related URL into the Git remotes field in the NR Project>Settings tab.
In the NR Settings > Git config tab I added an SSH key, which I then copied into the Github User settings > SSH and GPG tab. Then, in the Settings > Deploy keys of the empty repository I pressed the Add Deploy Key knob and added the created key.
When I make some changes to my flow I see that flow.json has changed. I can commit the changes locally. When I go to the commit history, I see a knob with Branch: master and a knob with the two arrows. When I press the two arrows a pop-up appears, stating “Your local branch is not currently tracking a remote branch”. When I press on the branch field, I get a red pop up with: " An unexpected error ocurred. “Error: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.”
Somewhere in the process in creating the SSH key I marked a field that there should be read/write rights.
I tried this over and over, but don’t know how to get on.
In the video a method is described to clone an existing repository. I tried to do this for the example project shown. But then I hit on the problem that I don’t have the passkey for the credentials.
For someone who is new, like me, it would probably be nice if there would be a description of how to start a project from scratch (create a New project), OR, to have an example project with the relevant passkey(s) available for cloning.
I struggled with this for days until I realized that my Github account has 2FA enabled. This means I should have been using an Access Token instead of my normal github account password. Unfortunately, there was no feedback from the Node-RED editor and it just accepted my regular password and silently fail. It wouldn't sync or display any warnings/errors.
I had this same problem and was stumbling around for quite a while until I found your comment and tried that. I suppose I just assumed that once you added your keys and the remote branch details it would know the branch name, but clearly not
The one other thing that got me into trouble is the ssh link you copy from github starts with git@, however the dialog in the add remote section suggests prefixing it with ssh://, which I did of course, but it doesn't actually want that at all