nimmis / docker-spigot

A docker container with spigot, builds spigot.jar on first start
174 stars 82 forks source link

Certificate error when downloading from hub.spigotmc.org #72

Open jdbrowndev opened 1 month ago

jdbrowndev commented 1 month ago

When running a new container that needs to build the BuildTools.jar file, I get this error message:

Building spigot version (1.21) jar file, be patient
--2024-07-15 21:47:20--  https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
Resolving hub.spigotmc.org (hub.spigotmc.org)... 104.27.195.95, 104.27.196.95, 2606:4700:21::681b:c35f, ...
Connecting to hub.spigotmc.org (hub.spigotmc.org)|104.27.195.95|:443... connected.
ERROR: cannot verify hub.spigotmc.org's certificate, issued by 'CN=E6,O=Let\'s Encrypt,C=US':
  Issued certificate has expired.
To connect to hub.spigotmc.org insecurely, use `--no-check-certificate'.
Error: Invalid or corrupt jarfile BuildTools.jar
cp: cannot stat '/build-mc/Spigot/Spigot-Server/target/spigot-*.jar': No such file or directory

I was able to fix this error by adding ca-certificates to this line in the Dockerfile:

41     # install application
42     apt-get install -y wget git jq ca-certificates && \

@nimmis Let me know if you would like me to submit a pull request with this change. Thanks.