{"id":617,"date":"2019-06-11T09:43:26","date_gmt":"2019-06-11T13:43:26","guid":{"rendered":"https:\/\/crossan007.dev\/blog\/?p=617"},"modified":"2019-06-11T09:54:19","modified_gmt":"2019-06-11T13:54:19","slug":"display-https-x509-cert-from-linux-cli","status":"publish","type":"post","link":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/","title":{"rendered":"Display HTTPS X509 Cert from Linux CLI"},"content":{"rendered":"\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=crossan007\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n\n<p>Recently, while attempting a <code>git pull<\/code>, I was confronted with the following error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Peer's certificate issuer has been marked as not trusted by the user.<\/code><\/pre>\n\n\n\n<p>The operation worked on a browser on my dev machine, and closer inspection revealed that the cert used to serve the GitLab service was valid, but for some reason the remote CentOS Linux server couldn&#8217;t pull from the remote.<\/p>\n\n\n\n<p>I found <a href=\"https:\/\/serverfault.com\/a\/661982\">this post on StackOverflow<\/a> detailing how to retrieve the X509 cert used to secure an HTTPS connection:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\necho | openssl s_client -showcerts -servername MyGitServer.org -connect MyGitServer.org:443 2&gt;\/dev\/null | openssl x509 -inform pem -noout -text\n<\/pre><\/div>\n\n\n<p>This was my ticket to discover why Git on my CentOS server didn&#8217;t like the certificate: the CentOS host was resolving the wrong DNS host name, and therefore using an invalid cert for the service.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.reddit.com\/r\/sysadmin\/comments\/4oj7pv\/network_solutions_haiku\/d4czk91?utm_source=share&amp;utm_medium=web2x\">And now a Haiku:<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"http:\/\/i.imgur.com\/eAwdKEC.png\" alt=\"http:\/\/i.imgur.com\/eAwdKEC.png\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Recently, while attempting a git pull, I was confronted with the following error: The operation worked on a browser on my dev machine, and closer inspection revealed that the cert used to serve the GitLab service was valid, but for some reason the remote CentOS Linux server couldn&#8217;t pull from the remote. I found this &hellip; <a href=\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Display HTTPS X509 Cert from Linux CLI<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[53],"tags":[240,250,117,25,115,230,158],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Display HTTPS X509 Cert from Linux CLI - Charles&#039; Blog\" \/>\n<meta property=\"og:description\" content=\"Recently, while attempting a git pull, I was confronted with the following error: The operation worked on a browser on my dev machine, and closer inspection revealed that the cert used to serve the GitLab service was valid, but for some reason the remote CentOS Linux server couldn&#8217;t pull from the remote. I found this &hellip; Continue reading Display HTTPS X509 Cert from Linux CLI &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"Charles&#039; Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-11T13:43:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-11T13:54:19+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/i.imgur.com\/eAwdKEC.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"crossan007\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crossan007.dev\/blog\/#website\",\"url\":\"https:\/\/crossan007.dev\/blog\/\",\"name\":\"Charles&#039; Blog\",\"description\":\"SharePoint | PowerShell | Exchange | SCCM | Ubuntu | PHP | JavaScript | A\/V Live Production | More...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crossan007.dev\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/i.imgur.com\/eAwdKEC.png\",\"contentUrl\":\"http:\/\/i.imgur.com\/eAwdKEC.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#webpage\",\"url\":\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/\",\"name\":\"Display HTTPS X509 Cert from Linux CLI - Charles&#039; Blog\",\"isPartOf\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#primaryimage\"},\"datePublished\":\"2019-06-11T13:43:26+00:00\",\"dateModified\":\"2019-06-11T13:54:19+00:00\",\"author\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979\"},\"breadcrumb\":{\"@id\":\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crossan007.dev\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Display HTTPS X509 Cert from Linux CLI\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979\",\"name\":\"crossan007\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/crossan007.dev\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g\",\"caption\":\"crossan007\"},\"url\":\"https:\/\/crossan007.dev\/blog\/author\/crossan007\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/","og_locale":"en_US","og_type":"article","og_title":"Display HTTPS X509 Cert from Linux CLI - Charles&#039; Blog","og_description":"Recently, while attempting a git pull, I was confronted with the following error: The operation worked on a browser on my dev machine, and closer inspection revealed that the cert used to serve the GitLab service was valid, but for some reason the remote CentOS Linux server couldn&#8217;t pull from the remote. I found this &hellip; Continue reading Display HTTPS X509 Cert from Linux CLI &rarr;","og_url":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/","og_site_name":"Charles&#039; Blog","article_published_time":"2019-06-11T13:43:26+00:00","article_modified_time":"2019-06-11T13:54:19+00:00","og_image":[{"url":"http:\/\/i.imgur.com\/eAwdKEC.png"}],"twitter_misc":{"Written by":"crossan007","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/crossan007.dev\/blog\/#website","url":"https:\/\/crossan007.dev\/blog\/","name":"Charles&#039; Blog","description":"SharePoint | PowerShell | Exchange | SCCM | Ubuntu | PHP | JavaScript | A\/V Live Production | More...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crossan007.dev\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#primaryimage","inLanguage":"en-US","url":"http:\/\/i.imgur.com\/eAwdKEC.png","contentUrl":"http:\/\/i.imgur.com\/eAwdKEC.png"},{"@type":"WebPage","@id":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#webpage","url":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/","name":"Display HTTPS X509 Cert from Linux CLI - Charles&#039; Blog","isPartOf":{"@id":"https:\/\/crossan007.dev\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#primaryimage"},"datePublished":"2019-06-11T13:43:26+00:00","dateModified":"2019-06-11T13:54:19+00:00","author":{"@id":"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979"},"breadcrumb":{"@id":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crossan007.dev\/blog\/tools\/display-https-x509-cert-from-linux-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crossan007.dev\/blog\/"},{"@type":"ListItem","position":2,"name":"Display HTTPS X509 Cert from Linux CLI"}]},{"@type":"Person","@id":"https:\/\/crossan007.dev\/blog\/#\/schema\/person\/bd99569cd81332c8fd866d023848b979","name":"crossan007","image":{"@type":"ImageObject","@id":"https:\/\/crossan007.dev\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fff72c74fb6a0da29accf0db83ad4b4b?s=96&d=mm&r=g","caption":"crossan007"},"url":"https:\/\/crossan007.dev\/blog\/author\/crossan007\/"}]}},"_links":{"self":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts\/617"}],"collection":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/comments?post=617"}],"version-history":[{"count":2,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts\/617\/revisions"}],"predecessor-version":[{"id":619,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/posts\/617\/revisions\/619"}],"wp:attachment":[{"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/media?parent=617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/categories?post=617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crossan007.dev\/blog\/wp-json\/wp\/v2\/tags?post=617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}