Error connecting to github over ssh. MATLAB only works with the old rsa encryption but github deprecated it

13 vues (au cours des 30 derniers jours)
Hey guys,
I'm using github over ssh for source control and for a while it was okay.
However, this week I started receiving the following error message when trying to pull / push:
Git internal error (Code = -20, Class = 23): ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
I've tried deleting the old key and generating a new key with different encryption (ECDSA) but I get the following error:
Git internal error (Code = -1, Class = 23): Failed to authenticate SSH session: Unable to open public key file
P.S. I'm using MATLAB 2021a, windows 11, with cygwin and with no external ssh client.
Would greatly appreciate any help!
  2 commentaires
camille catalano
camille catalano le 13 Avr 2022
Hi,
I've got the same issue but I tried with MATLAB 2021a, 2021b and 2022a and with ed25519 and ECDSA.
I'm using windows 10.
Thurston Brevett
Thurston Brevett le 5 Juin 2022
I have the same issue on ubuntu with R2021b
I've deleted my RSA keys and replaced them with ecdsa and ed25519 keys. System calls within the MATLAB environment i.e. !git fetch or !git push work flawlessly, but the integration (i.e. using the file explorer or project view) does not. I followed the instructions here to manually direct MATLAB to the key I wanted to use, and I also tried set ting the KeyHasPassphrase property to true even though the passphrase is empty.
It's as if MATLAB is using it's own git client and authentication first, because otherwise, I don't understand how there's an RSA authentication error when I don't have any RSA keys.

Connectez-vous pour commenter.

Réponses (1)

Esha Chakraborty
Esha Chakraborty le 12 Avr 2022
Hi Sharon,
I understand that you are encountering error in connecting to GitHub over ssh when using MATLAN R2021a.
In MATLAB R2021a, we don't handle ssh keys with passphrases. This is fixed in MATLAB R2021b. To work around, you can use Pageant as your ssh-agent or use a key without a passphrase.
Consider setting "passphrase" to 'on', and you should be able to communicate with Pageant via the following command:
settings().matlab.sourcecontrol.git.UseSSHAgent
This is likely to resolve your issue.

Catégories

En savoir plus sur Source Control Integration dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by