Reputation: 623
İ install my own git server in distant machine with ssl.
whene i use this command:
env GIT_SSL_NO_VERIFY=true git clone https://xxx.xxx.xxx.xxx/git/project.git
all is fine, and with env GIT_SSL_NO_VERIFY=true all git command work fine.
but i need pull and push with netbeans ide, so with netbeans ide i connot add this
env GIT_SSL_NO_VERIFY=true
so netbeans say:
Cannot connect to the remote repository at https://xxx.xxx.xxx.xxx/git/project.git
What i need to do?
Upvotes: 16
Views: 36414
Reputation: 12114
Agreed with other posters that GIT_SSL_NO_VERIFY or other means of preventing certificate verification is not the right solution. The best solution only takes a few seconds to implement, and is found in this answer:
https://stackoverflow.com/a/8467406/994153
It involves downloading the certificate .pem
file and setting the Git configuration variable http.sslCAinfo
to point to the file.
Upvotes: 0
Reputation: 13947
You could do this (from the git-config
manual page):
git config --global http.sslVerify false
But what's the point of having it on an https server if the certificate won't properly validate?
Upvotes: 33
Reputation: 140748
If the https server uses a self-signed certificate, save it to your local machine's hard disk (in .crt
format), and add this to .git/config
for the relevant working copy
[http]
sslCAInfo=/path/to/your-server-certificate.crt
That will make it always expect that certificate when connecting to the https server in question, and not otherwise.
Upvotes: 7