Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Binary GOGS with HTTPS #487

Closed
madduci opened this issue Sep 19, 2014 · 9 comments
Closed

Run Binary GOGS with HTTPS #487

madduci opened this issue Sep 19, 2014 · 9 comments
Labels
📦 deployment Related to deployments

Comments

@madduci
Copy link

madduci commented Sep 19, 2014

Hi

I'm trying to set up a binary executable of GOGS with the usage of self signed certificates (with custom/conf/app.ini), using OpenSSL, but I get the following message error:

[web.go:379 runWeb()] [E] Fail to start server: crypto/tls: failed to parse private key

How can I enable it?
Perhaps, you should include the script crypto/tls/generate_cert.go in the binary package as well.

@unknwon unknwon added the 📦 deployment Related to deployments label Sep 19, 2014
@unknwon
Copy link
Member

unknwon commented Sep 19, 2014

Hi, I use OpenSSL too. The key file should be the decrypted private key file, and cert file is the unified cert file. And you need to specify config options describe here: http://gogs.io/docs/intro/faqs.html#how-to-setup-https%3F

@unknwon
Copy link
Member

unknwon commented Sep 19, 2014

Perhaps, you should include the script crypto/tls/generate_cert.go in the binary package as well.

Good idea, should add a command to use Gogs generate these files.

@unknwon
Copy link
Member

unknwon commented Sep 24, 2014

Added this ability in latest code of master branch: http://gogs.io/docs/intro/faqs.html#how-to-setup-https%3F

@unknwon unknwon closed this as completed Sep 24, 2014
@badoet
Copy link

badoet commented May 24, 2015

tried to run ./gogs cert -ca=true -duration=8760h0m0s -host=mysite.com
but i get this error: Incorrect Usage.
i run it in the github.com/gogits/gogs folder..
did i do anything wrong?
i have openssl-1.0.1e installed on my server.
running on centos 7

@unknwon
Copy link
Member

unknwon commented Jul 15, 2015

Hi @badoet , from the info you provided there is nothing wrong, maybe there are some hidden special characters in your command line somehow occurred when you copy or type the command?

@ghost
Copy link

ghost commented Jul 15, 2015

HI,
I just installed a gogs server on my vps (installation from source) and I get the exact same message as @badoet.
I tried to run ./gogs cert and got :

Command cert not available, please use build tags 'cert' to rebuild.

I'm currently trying to do so but it seems not explained how to do it in the docs. Any clue about that ?

@unknwon
Copy link
Member

unknwon commented Jul 24, 2015

Hi @KevinHivert , use go build -tags "cert" will build Gogs with this subcommand. Hope helps!

@badoet
Copy link

badoet commented Jul 25, 2015

i somehow resolved my issue a few months back, but i forgot what was the solution that i used...

@unknwon
Copy link
Member

unknwon commented Jul 25, 2015

@badoet 😂 OK, this is what we called life...

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📦 deployment Related to deployments
Projects
None yet
Development

No branches or pull requests

3 participants