sp00led
sp00led

Reputation: 31

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. It's operational and using Safari I can login using a smart card and PIN. I cannot use SSH for this instance.

Does anyone know of a client or way to use Git in a terminal command that would support a smart card?

Any git clone attempts 403 fail due to not passing a valid certificate to the site.

Upvotes: 1

Views: 1225

Answers (1)

bk2204
bk2204

Reputation: 76874

Git is generally designed to operate on certificates in files. 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. If you're using a version built against OpenSSL or GnuTLS, then no, this isn't supported.

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.

Upvotes: 1

Related Questions