Closed QloudXee closed 10 months ago
Hey @QloudXee ,
Using those commands, I certainly get the same - I don't think this is generating a valid SSL certificate. This should generate a public and private key for you:
# Generates public and encrypted private key
openssl req -x509 -newkey rsa:4096 -keyout key-enc.pem -out cert.pem -sha256 -days 365
# Decrypt private key
openssl rsa -in ./key-enc.pem -out ./key.pem
# Run Terrareg (using using environment variables, as you're using)
python ./terrareg.py --ssl-cert-private-key ./key.pem --ssl-cert-public-key ./cert.pem
There is also some documentation, which uses mkcert (though I haven't personaly used it before), here: https://github.com/MatthewJohn/terrareg/blob/main/docs/LOCAL_DEVELOPMENT.md
Hope this helps!
Many thanks Matt
@MatthewJohn
Thanks I have resolve ssl problem .
But when I trying to upload module with upload_module.sh as the integration page told me , there shows following problem :
I do not want to configure git info , just use shell upload to container is enough. could you kindly give my some suggestion
Hey :)
So if you don't to configure the git info, then the "indexing" section of the integration page will not work (I will see why it's giving this error, if you don't have a git source configured).
With regards to uploading the file, I'm not sure what is causing the "internal server error". Is there anything in the logs that could indicate the issue (you can turn on debug logging using DEBUG (https://github.com/MatthewJohn/terrareg/blob/main/docs/CONFIG.md#debug), which should hopefully indicate what the problem is
Many thanks
hope this info would be helpful, and I tried these two zip file, so I think there is no problem with zip content
Oh, that's interesting - it seems tfswitch isn't installed! Just to clarify, you said you were running this in a docker container? If so, I'll need to investigate why tfswitch hasn't been installed.
Though, if you aren't running within a container, I've noticed that the installation of tfswitch is missing from the LOCAL_DEVELOPMENT.md instructions (which needs installing by running curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash
Thanks Matt
emmmm, I have resolve it, it seems to be something wrong with my image , recreate image the error not happend again. by the way , could you tell me how to config the ssl cert ,when i run "terraform init" ,an error appear:
Hey, yes, this is unfortunately a "thing" with Terraform - the SSL validity checks cannot be skipped (https://github.com/matthewJohn/terrareg#from-source).
The only ways around it are, either:
Apologies, I should have mentioned this when suggesting how to generate the certificate!
Many thanks Matt
@QloudXee ,
I hope this has helped - I will close for now, but if you have any further questions, feel free to re-open or create new tickets for any other issues :)
Thanks Matt
Sorry to disturb , Now I have configure an mkcert cert for terrareg & add rootCA.crt to ca-certificates. But when I run "terraform init" there is something wrong with the get request ,cloud you help me to analyse
Hey @QloudXee
Sure :)
So there should only be two reasons for 401 whilst downloading a module:
Hope this helps Matt
Created gitlab issue: https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/504 gitlab-issue-id:504
I have deploy terrareg with docker and create ssl key with following command:
however when I recreate container with -e SSL_CERT_PRIVATE_KEY=pathincontainer/rsa_private_key.pem & -e SSL_CERT_PUBLIC_KEY=pathincontainer/rsa_public_key.pem , it show error in docker logs "ssl.SSLError: [SSL] PEM lib (_ssl.c:3900)"
How should I fix it ,if you have any demo for ssl configuration will be better. thanks a lot