Resolving Git clone self-built SSL Gitlab prompt peer ' s certificate issuer is not recognized method

Source: Internet
Author: User
Tags openssl openssl x509 ssl certificate git clone stunnel


[root@iz620cgsubhz/tmp]# git clone https://git.dwhd.org/lookback/docker-gitlab.git
Cloning to ' Docker-gitlab ' ...
Fatal:unable to access ' https://git.dwhd.org/lookback/docker-gitlab.git/': Peer ' s certificate issuer are not recognized.


[root@iz620cgsubhz/tmp]# cd/etc/ssl/certs/
[root@iz620cgsubhz/etc/ssl/certs]# Make Serial=5
This makefile allows your to create:
o public/private Key Pairs
o SSL Certificate signing requests (CSRs)
o self-signed SSL test certificates

To create a key pair, run "make Something.key".
To create a CSR, run ' make SOMETHING.CSR '.
To create a test certificate, run "Make Something.crt".
To create a key and a test certificate in one file, run "Make Something.pem".

To create a key for use with Apache, run "Make Genkey".
To create a CSR for use with Apache, run ' make certreq '.
To create a test certificate for use with Apache, run "Make TestCert".

To create a test certificate with serial number than zero, add serial=num
You can also specify the key length with keylen=n and expiration in, with Days=n

Examples:
Make Server.key
Make SERVER.CSR
Make SERVER.CRT
Make Stunnel.pem
Make Genkey
Make CertReq
Make TestCert
Make SERVER.CRT serial=1
Make Stunnel.pem serial=2
Make TestCert serial=3
[root@iz620cgsubhz/etc/ssl/certs]# CD-
[root@iz620cgsubhz/tmp]# Echo ' Export git_ssl_no_verify=true ' >> ~/.BASHRC
[root@iz620cgsubhz/tmp]#. ~/.bashrc
[root@iz620cgsubhz/tmp]# Env|grep Git_ssl_no_verify
Git_ssl_no_verify=true
[root@iz620cgsubhz/tmp]#


[root@iz620cgsubhz/tmp]# git clone https://git.dwhd.org/lookback/docker-gitlab.git
Cloning to ' Docker-gitlab ' ...
Remote:counting objects:53, done.
Remote:compressing objects:100% (48/48), done.
Remote:total (Delta 7), reused 0 (Delta 0)
Expand the object: 100% (53/53), complete.
Check connection ... Complete.
[root@iz620cgsubhz/tmp]#


++++++++++++++++++++++++
If the above method is still not good, you can try the following
[root@ds-vm-node200 ~]# OpenSSL s_client-showcerts-connect git.dwhd.org:443/dev/null | OpenSSL x509-outform PEM >git.dwhd.org.crt
[root@ds-vm-node200 ~]# git config http.] https://git.dwhd.org/". Sslcainfo < Git.dwhd.org.crt[/bash]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.