X509 error deploy when using Data-driven Content
When I use Hugo's Data-driven content (https://gohugo.io/extras/datadrivencontent/), I got an error message during the deployment phase of my GitLab pages.
I added this piece of code to a html page:
{{ $dataJ := getJSON "https://jsonplaceholder.typicode.com/posts/" }}
{{ range first 5 $dataJ }}
<h1>{{ .title }}</h1>
{{ end }}
.. and got this error message during the deployment.
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on docker-auto-scale (4e4528ca)
Using Docker executor with image alpine:3.5 ...
Using docker image sha256:e9ceca3d12ff0c8ea09a9a506ea28653a34e400b991781fdf6b19155d95ec348 for predefined container...
Pulling docker image alpine:3.5 ...
Using docker image alpine:3.5 ID=sha256:4a415e3663882fbc554ee830889c68a33b3585503892cc718a4698e91ef2a526 for build container...
Running on runner-4e4528ca-project-3275970-concurrent-0 via runner-4e4528ca-machine-1494414419-9dbf883c-digital-ocean-2gb...
Cloning repository...
Cloning into '/builds/rickkuilman/hugo'...
Checking out b7b378d7 as master...
Skipping Git submodules setup
$ apk update && apk add openssl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
v3.5.2-72-g48776dcc01 [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
v3.5.2-70-gec9876f375 [http://dl-cdn.alpinelinux.org/alpine/v3.5/community]
OK: 7961 distinct packages available
(1/3) Installing libcrypto1.0 (1.0.2k-r0)
(2/3) Installing libssl1.0 (1.0.2k-r0)
(3/3) Installing openssl (1.0.2k-r0)
Executing busybox-1.25.1-r0.trigger
OK: 7 MiB in 14 packages
$ wget https://github.com/spf13/hugo/releases/download/v0.18.1/hugo_0.18.1_Linux-64bit.tar.gz
Connecting to github.com (192.30.253.113:443)
Connecting to github-cloud.s3.amazonaws.com (54.231.81.152:443)
hugo_0.18.1_Linux-64 100% |*******************************| 5208k 0:00:00 ETA
$ echo "e8ba723c508e87912970f132534c64dc hugo_0.18.1_Linux-64bit.tar.gz" | md5sum -c
hugo_0.18.1_Linux-64bit.tar.gz: OK
$ tar xf hugo_0.18.1_Linux-64bit.tar.gz --strip-components=1 && mv hugo_0.18.1_linux_amd64 hugo && cp ./hugo /usr/bin
$ hugo version
Hugo Static Site Generator v0.18.1 BuildDate: 2017-05-10T11:08:09Z
$ hugo
Started building sites ...
WARNING: .Page's RSSlink is deprecated and will be removed in a future release. Use RSSLink instead.
ERROR: 2017/05/10 11:08:09 template_resources.go:188: Failed to get json resource https://jsonplaceholder.typicode.com/posts/ with error message Get https://jsonplaceholder.typicode.com/posts/: x509: failed to load system roots and no roots provided
ERROR: 2017/05/10 11:08:09 general.go:236: Error while rendering "page ": template: theme/index.html:53:17: executing "theme/index.html" at <first 5 $dataJ>: error calling first: both limit and seq must be provided
ERROR: Job failed: exit code 255
Locally everything works just fine