How to push Node-RED to GitHub using access tokens

I'm having a bit of an issue pushing my Node-RED project to GitHub

I'm using Nose-RED version 2.0.5: Maintenance Release and node js v12.22.5

This is what I've done so far:

I created an empty repo in github and copied the address to my remote repositories in my project settings as shown below:

In my project history, I went to my commit history and pushed on the arrows for "Manage remote branch" but then nothing happens.

The first time I did this, I got prompted for my username and password. After logging in, I got a message saying that GitHub now needs access tokens to provide access.

I went back to GitHub and created one, but now I cant find how to add those credentials to get Node Red to sync.

I went through the official "node-red projects" youtube video but it uses SSH keys, not tokens.

¿Does anyone know how to provide the access token?

Thanks!

Hi @portfedh

you use the token in place of the password when it prompts for your credentials.

However, it does cache things in memory (so it doesn't prompt every time). It should prompt again if the user/password weren't accepted - but if that isn't happening, try restarting Node-RED itself. That will flush the credential cache for sure.

I just restarted node red using:

$ node-red-restart

Since I didn't get prompted, I restarted the Raspberry Pi but I'm still not getting prompted.

Is is possible to force the prompt? or add the credentials in a file?

Node-RED only stores the repo credentials in memory. If you have restarted Node-RED, then it will prompt you for credentials the next time you do something that tries to interact with the remote repository.

If it is not doing that, then please check in the browser's javascript console for any error messages.

Got it, thank you.

I got it to prompt the username/password again by adding the remote branch: "main" and then pushing "Push".

Thanks for your help @knolleary !

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