Error Reading X.509 Key or Certificate File: Error While Reading File.
症状
The post-obit message is displayed when trying topush
to a Stash repository:
error: Issuer certificate is invalid. while accessing https://<USERNAME>@<STASH_HOST>:8443/ABC/test.git/info/refs fatal: HTTP request failed
Yous just added a self signed document to Stash and at present your users are getting errors:
fatal: unable to access 'https://<username>@<stash_server>:<port>/<context>/scm/<project>/<repository>/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
原因
The Stash certificate is not trusted by the git
client.
回避策
A very good commodity on the subject tin exist found here on Stack Overflow. In summary when you use a self signed document Git doesn't trust the certificate that is being sent to it. You lot tin prepare this in two ways:
- On each customer organization run:
git config --global http.sslVerify false
- The safer solution is to install the cocky signed server document on the git client automobile.
I would suggest reviewing all of the answers and comments on that mail service as at that place are many competing opinions on the subject.
ソリューション
To be able to utilize a cocky-signed document exercise the post-obit:
ソリューション 1
- Re-create the Stash server's
certificate.pem
file to the git client'south host. - Convert the file into the
X.509
format.
openssl x509 -
in
certificate.pem -out certificate.crt
- Now permit git to use this certificate by changing the user'south git configuration file:
git config http.sslcainfo certificate.crt
All commands must be executed in the
<PATH>
where the certificate was copied to.
ソリューション 2
Utilize a document that is signed by a Certificate Authority. These certificates are automatically trusted.
Source: https://ja.confluence.atlassian.com/stashkb/can-t-access-stash-with-git-issuer-certificate-is-invalid-303661225.html
إرسال تعليق for "Error Reading X.509 Key or Certificate File: Error While Reading File."