Node-RED Project SSH authentication

So recently I have been getting emails from Github about them phasing out Basic authentication using a password to Git in favor of SSH and token-based keys. This is where the problem is starting.

I was able to create a new remote from the Hamburger Menu > Projects > Project Settings > Settings > Git Remotes > add remote, but was unsure exactly what format to URL should be, I assumed it was "ssh://".

Then I generated an SSH key from Hamburger Menu > Settings > Git config > SSH Keys > add key which I proceeded to copy into my Github account under the SSH and GPG keys section of the settings. I tried with and without a passphrase.

When I try to select a remote under commit via Project History > Commit History > Remote this dialog pops up with or without a passphrase provided when the SSH key was generated. When the passphrase was provided, entering it again did not work BTW.

Any ideas about what I am doing wrong? Do the names for the SSH keys have to match between NR and Github?

Update: Same name did not change anything.

My remote doesn't contain the ssh:// part, maybe try without? Did you copy the remote from your github repository?

I tried that as well, and then it gives this dialog, also yes I copied directly from my repo's page on Github

The reason I added the ssh:// was because of this:
I also tried removing the git@ part and it results in the same dialog, so I surmised that that is the default dialog when something with the URL goes wrong.

I see, I don't have the ssh:// and it works fine. Do you use the exact same username and email for Node-RED and GitHub? (in settings > git config)

Yeah it is the same including case sensitivity. If you have it working are the steps I listed correct or?

As far as I can tell yes, although I create the ssh key before the remote and didn't use ssh://... If you are running this on windows it might be that you didn't configure Git correctly (username and email)? I'm not entirely sure tbh

RPi 3B setup and I checked the globals and they seem to be correct, but I thought the settings > git config details override that anyway.

Update: I just added 2FA and then made an access token and am using HTTPS again now, but I still want to get this SSH authentication working.

BTW @quentinP did you initially clone using SSH or did you change an existing project to use SSH?

So I remember also having problems with SSH. My solution was to basically upload my Node-RED files to GitHub manually and then clone the project through SHH. This seems to work best. I was having some issues with a project recently and basicically deleted it, then re-cloned it and it worked

1 Like

Yeah I was wondering about that, I will give that a try when I reset my RPi installation as it has been giving me issues and report back. Either way though, I think it should be working as I did it and I think this is a bug that needs to be fixed.