Matlab to GitLab connection with SSH returns git error: resolve: The specified class was not found
显示 更早的评论
Hello,
we've been attempting to establish the source control feature in Matlab R2022b with our Gitlab Server via SSH (Https not possible due to authentification) and we keep getting the same error message, when validating or connecting with the server:
"Unable to validate the specified path with the following git error:
resolve: the specified class was not found"

The SSH connection works flawlessly with Tortoise Git in the Windows Explorer.
We've carefully read and tested the SSH setup for Matlab, according to the setup (Set Source Control Preferences - MATLAB & Simulink - MathWorks Deutschland) and the other advices from MathWorks (Why do I receive an "Auth fail" error when interacting with a Git remote over SSH in MATLAB or why does MATLAB keep... - MATLAB Answers - MATLAB Central (mathworks.com))
The following steps have been taken
- Key Generation from Windows Command window
- Private Key is an OPENSSH type (apperently supported for R2022b and for all Releases after R2021a)
-----BEGIN OPENSSH PRIVATE KEY-----
*key*
-----END OPENSSH PRIVATE KEY-----
3. Environment variable 'Home' is set to the user directory: C:/Users/user/
4. Matlab Git settings
git = settings().matlab.sourcecontrol.git;
git.PrivateKeyFile.PersonalValue = "C:\Users\user\.ssh\ssh_key_20231113";
git.PublicKeyFile.PersonalValue = "C:\Users\user\.ssh\ssh_key_20231113.pub";
git.KeyHasPassphrase.PersonalValue = true;
5. Public Key is stored in GitLab
We also tried to find config files for the git SSH connection within the MATLAB directory on the hard drive, but all files are encrypted, so there is no chance to manually adjust a config.

We're having this issue with the SSH connection over Matlab Source control with all git-servers we've been using until now, only HTTPS worked has so far, but is currently no option for the GitLab server.
I'd hope for reasonable solutions from MathWorks or anyone with a similar problem. Moving to a newer release is possible, but I'd expect that the Source Control feature should work with a reasonably new version as R2022b.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Source Control 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!