I have my own GIT server repository and can be connected via HTTPS protocol.
I am trying to setup TeamCity to connect to my GIT repo but I am unable to because of the HTTPS protocol.
In Eclipse, I have a setting that sets sslVerify=false and I can connect to my GIT repo and perform my task.
How can i achieve the same for TeamCity?
As issue TW-30210 illustrates, it can depends on the version of TeamCity and Java you are using.
It also depends if your certificate is self-signed or not.
If is is signed (and validate by an actual CA - Certificate Authority), then you need to add it in your java keystore (used by TeamCity): see "Using HTTPS to access TeamCity server".
If you just want to disable ssl verification, you can do on the TeamCity server:
for the java you are using to run the TeamCity server.
-Dcom.sun.net.ssl.checkRevocation=false
But that is considered as a bad practice.
Addition for answer above with samples for default setup:
openssl s_client -connect <githost>:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /opt/exported.cert
keytool -import -noprompt -trustcacerts -alias <githost> -file /opt/exported.cert -keystore ${JAVA_HOME}/jre/lib/security/cacerts -storepass changeit
Where,
githost - domain name of host with git repo
We were using 32-bit version of git on teamcity server (64-bit). So removing 32-bit and installing 64-bit git bash and git cmd helped resolve the GIT and Teamcity connection problem for us. I hope this help some users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With