Using git with https client certificate

How to clone a git repository over client certificate authenticated https protocol.

This guide sets the local git configuration instead of the global one.

Clone the repository from to

, the client certificate is available in in p12 format.

git init
openssl pkcs12 -in mycert.p12 -nocerts -out mycert.key -nodes
openssl pkcs12 -in mycert.p12 -clcerts -nokeys -out mycert.crt
openssl pkcs12 -in mycert.p12 -cacerts -nokeys -out cacert.crt
git config --local http.sslCert "/mycert.crt"
git config --local http.sslKey "/mycert.key"
git config --local http.sslCaInfo "/cacert.crt"
git config --local http.sslVerify "false"
git pull git pull


Anonymous said...

It's not my first time to visit this site, i am browsing this site dailly and get good information from here every day.|

My blog ... homepage ()

Anonymous said...

When you do this : git config --local http.sslVerify "false" , you disable your ssl !!

isabellaJoseph said...

hello admin.i am truly cherish it your blog.Because your clarification insightful every one of the themes are excessively good.I got enough information from your blog.Thanks for sharing more.. Devops Training in Bangalore
Devops Training Institute in Bangalore
Best Devops Training in Bangalore

Sadiya Moshin said...

Interesting rare Blog on git with https.
Thank you for sharing your knowledge of Clone the repository from client https.
Devops Training in Bnagalore

Jessica said...

This was so useful and informative. The article helped me to learn something new. Best AWS training institute in Bangalore

Post a Comment

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Top WordPress Themes