gitlab的api调用,其实就是这么简单,加k就是为了对没有权限的ssl进行忽略。
-k/--insecure
(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certifi-
cate bundle installed by default. This makes all connections considered "insecure" fail unless -k/--insecure is used.
See this online resource for further details: http://curl.haxx.se/docs/sslcerts.html
curl -k --header "PRIVATE-TOKEN: **********" "https://gitlab.bigdata.le.com/api/v3/projects"
curl --insecure --header "PRIVATE-TOKEN: ********" "https://gitlab.bigdata.le.com/api/v3/projects"