Projects, github, ssh and basic-auth deprecation

I've seen a few threads here about similar topics but they seem to be timed out or not exactly what I want to figure out.

I connected my nodered instance to a remote github repository about a year ago and used it without an ssh key.

I now created a new ssh key in nodered settings > Git config.

I then did another little change to my flows, deployed, committed to local repository and then pushed to remote.
=> I got the little popup for github user authentication with user and password.

I did another little change to my flows, deployed, committed to local repository and pushed to remote.
=> no little popup for github user authentication.

I'm now not sure whether nodered ever started using the new ssh key to connect to github, or whether it's still using basic auth despite my having added an ssh key.

I guess I'm asking:

  1. How do I know whether nodered is connecting to github via ssh key?
  2. How can I force nodered to connect with ssh key?

To force the use of an SSH key, I believe that you have to clone your repos using the SSH URI instead of the HTTPS one. If you use HTTPS, you will be using OAuth tokens. That is why you see the login page once.

This page may be helpful: GitHub’s Move Away From Passwords: A Sign Of Things To Come? | Hackaday

While you are thinking about GitHub security, I strongly urge you to turn on 2FA for your GitHub account as well if you haven't already.

Thanks for this valuable little insight!

I just deleted the old remote repository from project settings and tried adding the ssh URI instead.

Then I go to Project History, Commit history, click on the arrows ("Manage remote branch") and see "Remote: None"

I click on "Remote: None", assuming it will show me my newly added ssh-connection, but it just stays in the progress bar/waiting thingy.

any ideas?

I guess you have to add an upstream repo. I'm not terribly familiar with all that I'm afraid, my git-foo is pretty basic :slight_smile:

Well that's what I'm trying to do but it never shows anything, instead just the Knightrider waiting gif thingy.

I'm now wondering if it's even possible to add a new remote repository (well actually the same one, just with a different mode-of-connecting) after the local repository already exists.

I'm not seeing any firewall activitiy or any nodered log entries that tell me anything is going wrong. But it never stops the knightrider-thing.

You can always add/change the upstream. That is one of the features of git.

Yeah but does nodered support it?

Node-RED only uses git under the hood, it doesn't handle anything itself.

And of course, I should have been saying "remote" rather than "upstream".

I'm using the nodered UI so I have not idea what's happening between nodered and its under-the-hood git installation. (but I also have only a superficial understanding of git, so that doesn't help)

You can add/remove remotes via the Node-RED Project Settings dialog as much as you like.

Can you open up the browser developer console (View->Developer->JavaScript Console on Chrome... other browsers have it somewhere...) and check for any error messages?

how do I always forget to do this?

any idea what this might be?

It may be the case that its got into a slightly odd state with all the add/removing you've been trying.

Can you restart Node-RED on the server and then reload the editor - that'll get all of the internal state into a clean and consistent state.

the screenshot was done right after a docker container restart.

I'm running v1.0.2 in case that matters

can you think of anything I need to worry about when upgrading from 1.0.2 to the latest version? (I've done it before with my current docker-compose setup with the /data in its own volume, so I'm assuming it'll work as smooth as ever?)

Well I updated to 1.3.3.

I now see a popup window when I hit the "Remote:none" button (trying to push to remote).

Any suggestions?

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