Skip to content

The Unified and Autonomous Development Platform

Add -k option to curl to avoid SSL certificate verfication issue when call back to Java in git hooks.

robin shined602b0183fca
diff --git a/gitop.core/src/main/resources/git-postreceive-hook b/gitop.core/src/main/resources/git-postreceive-hook
index 0dd109f247..8d51e8619b 100644
--- a/gitop.core/src/main/resources/git-postreceive-hook
+++ b/gitop.core/src/main/resources/git-postreceive-hook
@@ -1,6 +1,6 @@
#!/bin/sh
IFS=$'\r\n';
-lines=($(curl -s -S -f -X POST -d @- ${GITOP_URL}/git-postreceive-callback/${GITOP_PROJECT_ID}/${GITOP_USER_ID} 2>&1))
+lines=($(curl -k -s -S -f -X POST -d @- ${GITOP_URL}/git-postreceive-callback/${GITOP_PROJECT_ID}/${GITOP_USER_ID} 2>&1))
returnCode=0;
diff --git a/gitop.core/src/main/resources/git-update-hook b/gitop.core/src/main/resources/git-update-hook
index e1eab48bdb..381ee891f5 100644
--- a/gitop.core/src/main/resources/git-update-hook
+++ b/gitop.core/src/main/resources/git-update-hook
@@ -1,7 +1,7 @@
#!/bin/sh
IFS=$'\r\n';
lines=($(
-curl -s -S -f -X POST -d @- ${GITOP_URL}/git-update-callback/${GITOP_PROJECT_ID}/${GITOP_USER_ID} 2>&1 <<EOF
+curl -k -s -S -f -X POST -d @- ${GITOP_URL}/git-update-callback/${GITOP_PROJECT_ID}/${GITOP_USER_ID} 2>&1 <<EOF
$1 $2 $3
EOF
))