Can I use client certificates in Git for my project?
11 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2025-11-13,0:00
编辑: MathWorks Support Team
2025-11-26,8:38
How do I source a MATLAB project in GitLab using "Certificate AAA.crt", "Private Key AAA.key", and "Manual Passphrase Input" issued by GitLab?
Currently, if you set it like this, you will get an error.
Config command
git = settings().matlab.sourcecontrol.git;
git. PrivateKeyFile.PersonalValue = "Full path to AAA.key";
git. PublicKeyFile.PersonalValue = "Full path to AAA.crt";
git. KeyHasPassphrase.PersonalValue = true;
Error
"could not initialize security context:(-1x2)"
采纳的回答
MathWorks Support Team
2025-11-26,0:00
Currently, MATLAB does not support the use of client certificates. MATLAB uses a library called libgit2, but it does not currently support client certificates.
(See the following links for more information: https://github.com/libgit2/libgit2/issues/4204 )。
Only workaround is to use a Git client that supports client certificates to perform clone/fetch/push operations.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Source Control 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!