anchordotdev / cli

MIT License
147 stars 3 forks source link

Error: acme/autocert: certificate is not valid yet #24

Open abdessamadmekkaoui opened 6 days ago

abdessamadmekkaoui commented 6 days ago

Are there any additional details you would like to share?


Command: anchor lcl Executable: C:\Program Files\Anchor CLI\anchor.exe Version: 0.0.38 (windows/amd64) Commit: 38a58bce9066abd76402b4acf560bfce5c03ec94 BuildDate: 2024-06-25T19:20:43Z Arguments: [] Flags: [] Timestamp: 2024-06-29T11:49:41.588767Z Stdout:

# Signin to Anchor.dev `anchor auth signin`
    | Please sign up or sign in with your Anchor account.
    | 
    | Once authenticated, we can provision your personalized Anchor resources to
    | power HTTPS in your local development environment.
    - Copied your user code FDXG-MQQZ to your clipboard.
    - Opened https://anchor.dev/users/sign_in/cli?signup_src=lclhost in your browser.
    - Signed in as mekkaouiabdelkader2001@gmail.com.
| Let's set up fast and totally free lcl.host HTTPS!
# Setup lcl.host HTTPS Local Development Environment `anchor lcl`
    | After setup, you can use HTTPS locally in your browsers and other programs.
# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit`
    | We'll begin by checking your system to determine what you need for your setup.
    - Checked resources on Anchor.dev: need to provision resources.
    - Compared local and expected CA certificates: need to install 2 missing certificates.
# Configure System for lcl.host HTTPS Local Development `anchor lcl config`
    | Before issuing HTTPS certificates, we need to configure your browsers
    | and OS to trust your personal certificates.
    |
    | We'll start a local diagnostic web server to guide you through the process.
    - Entered hi-mekkaouiabdessamad0.lcl.host domain for lcl.host diagnostic certificate.
    - Resolved hi-mekkaouiabdessamad0.lcl.host domain: success!
    | Now we'll provision Anchor.dev resources and HTTPS certificates for you.
    - Creating hi-mekkaouiabdessamad0 [hi-mekkaouiabdessamad0.lcl.host, hi-mekkaouiabdessamad0.localhost] diagnostic resources on Anchor.dev… ⠋
geemus commented 6 days ago

@mekkaouiabdessamad0 - Hey, sorry to hear you are having problems.

After some investigation it looks like the most likely cause is clock drift. In particular, it seems likely that either your computer or the server was far enough out of sync that the certificate that ended up being created would fail in this way.

Could you ensure your systems clock is updated to be accurate and try again?

benburkert commented 2 days ago

hi @mekkaouiabdessamad0, we recently deployed a change to backdate new certificates by 1 minute when provisioned from the CLI. This should avoid most issues with clock drift, please give this another try and let us know if you're still experiencing problems.