解決GIT clone自建ssl gitlab的時候提示Peer’s Certificate issuer is not recognized方法

來源:互聯網
上載者:User


[root@iZ620cgsubhZ /tmp]# git clone https://git.dwhd.org/lookback/docker-gitlab.git
正複製到 'docker-gitlab'...
fatal: unable to access 'https://git.dwhd.org/lookback/docker-gitlab.git/': Peer's Certificate issuer is not recognized.


[root@iZ620cgsubhZ /tmp]# cd /etc/ssl/certs/
[root@iZ620cgsubhZ /etc/ssl/certs]# make SERIAL=5
This makefile allows you 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 other than zero, add SERIAL=num
You can also specify key length with KEYLEN=n and expiration in days 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
正複製到 'docker-gitlab'...
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 53 (delta 7), reused 0 (delta 0)
展開對象中: 100% (53/53), 完成.
檢查串連... 完成。
[root@iZ620cgsubhZ /tmp]#


++++++++++++++++++++++++
如果上面的辦法還是不行,可以試試下面的
[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]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.