Beta Git client and SSH keys
|
Hi all, Has anyone managed to get SSH keys working in the beta Git client? I generated a key on my MacBook and added it to my ROOL GitLab account. All good. I can check-out from ROOL. I tried with GitHub, and I get an error about the encryption type being deprecated. Is anyone using the Git client with GitHub? Is there some magic I need to do to generate a key with a newer encryption type, but still in the old format which the Git client will accept? |
|
Can’t speak for “anyone” but I tried a while back and got the same result as you. I did report the problem (informally) to the ROOL stand at the SouthWest Show. |
|
Untested by me, but if you want to beef up the encryption but still write out as a PEM file (PEM isn’t “old” as far as I can tell) try
or
I wrote down the question and passed it on on 25-Feb-2024 to ROOL’s Git expert, I think you got a reply (which I was copied on) to the effect that you’d used an ancient version of ssh-keygen from riscos.info from circa 2014 and that didn’t generate keys with enough bits by default for GitHub’s requirements. ie. it wasn’t that the Git client was doing something odd, merely passing along a SHA-1 key which they don’t accept now. |
|
Ah-ha! I was assuming that someone here had been there and got the t-shirt, but actually, your magic untested incantation of options there has done the trick! So thank you very much for that. For anyone else doing the same, then you want:
Also, the git client StrongHelp file has the Public/Private key filenames mixed-up. |
|
Seems like the Git client as received a new stealthy update |
|
> stealthy update It did precede the news article a little, but it wasn’t intended to be stealthy! |
|
Old habits really do die hard. Last year I was an enthusiastic Git user and could not imagine how I had been managing without it. Then Summer started, the grass was growing and my attention turned to an acre or so of garden and orchard, Apart from looking at email I hardly touched the computer. At Christmas I put away my scythe and gardening gloves and came into the warm and picked up the programmer’s pencil once more. Only now the thought of using Git was daunting so I went back to the bad old ways. Open the development directory drag and drop the active program onto the ever open RAM disc filer window. Then drag and drop the RAM disc copy onto !Transient. Now I have backup and can modify without anxiety. I noted the Git update and have downloaded it and I will start using it again. |
|
Just had a try with this, an attempt to sync my MIDI module with GitHub. It seems… complicated… but the show stopper is this: *git push Certificate type X509 for host github.com is valid Username for 'xyzzy':MyNameHere Password for 'xyzzy':MyPassword git2 :unexpected EOF Ummm…? Could it be because my module was translated to use the Shared Makefiles, and those create a bunch of unnecessary empty directories? (aif, aof, gpa, etcetc)? It’s a shame there isn’t a UI way to sync files with the remote (or did I miss something?), along with a way to have it remember the password (because it’s an auto-generated bunch of gibberish). |
|
Okay, it looks like I need to use SSH and not the default HTTPS. Fair enough. I first did: *ssh-keygen -m pem -C "MyEmailHere" -f mykey Generating public/private rsa key of 2048 bits Writing private key to mykey Writing public key to mykey/pub as directed by the help file, and copied the two files to the directed place in Choices:WWW Then I tried: *git push Certificate type Host Key for host github.com is invalid Enter passphrase:--------------- Bad passphrase, try again: Invalid host key? And… the passphrase isn’t the login password? Where does the passphrase come from? |
|
No, it’s probably the passphrase for your private key.
You set it when generating the key. |
|
It… never asks. Simply says it is generating, takes a few moments, then writes the files, as shown above. |
|
Well I used it to checkout a repo over ssh from a Linux Pi, I had to use user name and password as it didn’t use the ssh key in !UnixHome.ssh (generated with the supplied ssh-keygen) complaining about certificate type. I modified something externally and tried a git pull, it failed because of a claimed local change. git diff said the permissions of every file had been changed from 100755 to 100644. As this doesn’t correspond to the RISC OS permissions I gave up at that point and when back to using a shared directory with Linux. |