Maven is actually using JAVA_HOME environment variable configured into your system. So we need to tell to JVM that trust my certificate.
You can use following command to add certificate (.pem) file to your JDK (please make sure that you are using the same JDK for maven, you can check the JDK path used with maven using : mvn --version). I am giving below command as per my local machine paths, you can change accordingly.
keytool -importcert -file D:\me\info\Cyberoam_SSL_CA.pem -keystore "C:\Program Files\Java\jdk1.8.0_65\jre\lib\security\cacerts"
Please note that above solution will allow you to run mvn from command promt only. You might need to do some extra stuff if you are using maven plugin for eclipse or any other IDEs.
Git is not connected with JDK, so we need to tell to Git externally to trust your certificate.
You can use following command to add certificate (.pem) file to your Git. I am giving below command as per my local machine paths, you can change accordingly.
git config --global http.sslCAInfo D:\me\info\Cyberoam_SSL_CA.pem
Please note that above solution will allow you to run git from command promt only. You might need to do some extra stuff if you are using git plugin for eclipse or any other IDEs.