简体   繁体   English

有没有办法在 macOS 上使用智能卡连接到 GIT HTTPS 站点?

[英]Is there a way to connect to a GIT HTTPS site using a smart card on macOS?

I have a bitbucket site that supports smart cards only.我有一个仅支持智能卡的 bitbucket 站点。 It's operational and using Safari I can login using a smart card and PIN.它可以运行并且使用 Safari 我可以使用智能卡和 PIN 登录。 I cannot use SSH for this instance.对于这个实例,我不能使用 SSH。

Does anyone know of a client or way to use Git in a terminal command that would support a smart card?有谁知道在支持智能卡的终端命令中使用 Git 的客户端或方法?

Any git clone attempts 403 fail due to not passing a valid certificate to the site.由于未将有效证书传递给站点,任何 git 克隆尝试 403 都会失败。

Git is generally designed to operate on certificates in files. Git 通常设计用于对文件中的证书进行操作。 However, if you're using HTTPS and your Git is built against Apple's Secure Transport library, then you can set http.sslCert to a handle to a certificate in the keychain, as documented in the libcurl documentation .但是,如果您使用 HTTPS 并且您的 Git 是针对 Apple 的安全传输库构建的,那么您可以将http.sslCert设置为一个句柄中记录的库文件中的证书到一个句柄。 If you're using a version built against OpenSSL or GnuTLS, then no, this isn't supported.如果您使用的是针对 OpenSSL 或 GnuTLS 构建的版本,那么不,这不受支持。

If that doesn't work, you'll need to contact your server administrator about providing a functional approach, such as using SSH, or providing suitable documentation about how to appropriately use the server.如果这不起作用,您需要联系您的服务器管理员以提供功能方法,例如使用 SSH,或提供有关如何正确使用服务器的合适文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM