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

SSL tries to generate certificates even when it has detected it can't #331

Closed
ErisDS opened this issue Jul 10, 2017 · 2 comments · Fixed by #340
Closed

SSL tries to generate certificates even when it has detected it can't #331

ErisDS opened this issue Jul 10, 2017 · 2 comments · Fixed by #340
Labels

Comments

@ErisDS
Copy link
Member

ErisDS commented Jul 10, 2017

There is a logic error somewhere :)

The ssl task runs a DNS check (and other checks) before even trying to run the letsencrypt command.

It can correctly detect that my DNS is not setup yet, and says [skipping]

However, the letsencrypt and ssl tasks still run, and eventually fail.

See this gist for a far clearer picture of what's happening:

https://gist.github.com/ErisDS/8f3f11065bc7d5765998e06a1e4ae1e5

Relevant excerpt:

[12:47:02] Setting up SSL [started]
  | [12:47:02] Checking DNS resolution [started]
  | Uh-oh! It looks like your domain isn't set up correctly yet. Because of this, SSL setup won't work correctly. Once you've set up your domain and pointed it at this server's IP, try running `ghost setup ssl` again.
  | [12:47:02] Setting up SSL [skipped]
  | [12:47:02] Checking DNS resolution [completed]
  | [12:47:02] Preparing Nginx for Let's Encrypt SSL certificate creation [started]
  | [12:47:02] Preparing Nginx for Let's Encrypt SSL certificate creation [completed]
  | [12:47:02] Restarting Nginx [started]
  | Running sudo command: service nginx restart
  | [12:47:02] Restarting Nginx [completed]
  | [12:47:02] Getting SSL Certificate [started]
  | [12:47:09] Getting SSL Certificate [failed]
@ErisDS ErisDS added the bug label Jul 10, 2017
@ErisDS
Copy link
Member Author

ErisDS commented Jul 10, 2017

@acburdine is the best way to fix this, to use a nested listr, or to pass around some skip parameter (like userExists in the linux extension).

Just wondering what the preferred pattern is, cos I think I can fix this

@acburdine
Copy link
Member

Ah I see what the issue is -> passing around the skip parameter is the preferred pattern.

@ErisDS ErisDS changed the title SSL tries to generate config even when it has detected it can't SSL tries to generate certificates even when it has detected it can't Jul 10, 2017
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 10, 2017
ErisDS pushed a commit that referenced this issue Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants