필터 지우기
필터 지우기

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

조회 수: 8 (최근 30일)
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
camille catalano
camille catalano 2022년 4월 13일
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 2022년 6월 5일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Esha Chakraborty
Esha Chakraborty 2022년 4월 12일
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.

카테고리

Help CenterFile Exchange에서 Source Control Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by