curl 登录https网站

来源:互联网 发布:简易返利源码 编辑:程序博客网 时间:2024/05/18 10:00

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"
0 0