Giter Site home page Giter Site logo

Comments (12)

mholt avatar mholt commented on May 16, 2024 4

You can pin to master for now, but safer might be a tagged release:

xcaddy build v2.2.0-rc.1 \
    --with github.com/caddy-dns/cloudflare@latest

Once v2.2.0 is tagged, you won't have to specify the version anymore.

from cloudflare.

oxalorg avatar oxalorg commented on May 16, 2024 1

I'm having the same issue.

I think it's similar to smallstep/certificates#333

Not familiar with go tooling. But not sure why xcaddy ends up using smallstep/[email protected]... when caddy has github.com/smallstep/certificates v0.14.6 in it's go.mod file.

@mr-karan if you're aware of a way to force pin dependencies, maybe that will work?

As a temporary fix it's working with Caddy master:

xcaddy build master --with github.com/caddy-dns/cloudflare

from cloudflare.

mholt avatar mholt commented on May 16, 2024 1

I just copied and pasted your command you posted above, which uses the latest tagged version. If the last time you tried running that command was 2-3 months ago, that explains the issue.

from cloudflare.

oxalorg avatar oxalorg commented on May 16, 2024

Looks like it was an issue with upstream. It's fixed in this commit caddyserver/caddy@2a5599e

Edit: Unfortunately caddy is failing to get a wildcard cert, not sure if it's because I'm running on master or some other issue

Edit2: Nope. Apparently Caddy Wildcard DNS challenge fails if wildcard dns is a CNAME instead of an A record. Had to dig into issues from last year to figure this out caddyserver/caddy#2437 😢

from cloudflare.

symgryph avatar symgryph commented on May 16, 2024

Having same problem. Looks like the pinning to master fixes it.

from cloudflare.

ArcCal avatar ArcCal commented on May 16, 2024

INPUT: xcaddy build v2.1.1 --with github.com/caddy-dns/cloudflare@latest

**OUTPUT:**2020/09/01 08:33:21 [INFO] Temporary folder: /tmp/buildenv_2020-09-01-0833.53261 1091
2020/09/01 08:33:21 [INFO] Writing main module: /tmp/buildenv_2020-09-01-0833.53 2611091/main.go
2020/09/01 08:33:21 [INFO] Initializing Go module
2020/09/01 08:33:21 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init cad dy
go: creating new go.mod: module caddy
2020/09/01 08:33:21 [INFO] Pinning versions
2020/09/01 08:33:21 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v git hub.com/caddyserver/caddy/[email protected]
2020/09/01 08:33:22 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v git hub.com/caddy-dns/cloudflare@latest
go: github.com/caddy-dns/cloudflare latest => v0.0.0-20200811180534-4494da72fa56
2020/09/01 08:33:23 [INFO] Build environment ready
2020/09/01 08:33:23 [INFO] Building Caddy
2020/09/01 08:33:23 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /roo t/caddy -ldflags -w -s -trimpath

github.com/smallstep/certificates/authority/provisioner

/root/go/pkg/mod/github.com/smallstep/[email protected] -e855707dc274/authority/provisioner/jwk.go:155:24: assignment mismatch: 3 variab les but x509util.SplitSANs returns 4 values
/root/go/pkg/mod/github.com/smallstep/[email protected] -e855707dc274/authority/provisioner/x5c.go:197:24: assignment mismatch: 3 variab les but x509util.SplitSANs returns 4 values
2020/09/01 08:33:24 [INFO] Cleaning up temporary folder: /tmp/buildenv_2020-09-0 1-0833.532611091
2020/09/01 08:33:24 [FATAL] exit status 2

INPUT:xcaddy build v2.2.0-rc.1 --with github.com/caddy-dns/cloudflare@latest

OUTPUT:
2020/09/01 08:34:15 [INFO] Temporary folder: /tmp/buildenv_2020-09-01-0834.242359201
2020/09/01 08:34:15 [INFO] Writing main module: /tmp/buildenv_2020-09-01-0834.242359201/main.go
2020/09/01 08:34:15 [INFO] Initializing Go module
2020/09/01 08:34:15 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy
go: creating new go.mod: module caddy
2020/09/01 08:34:15 [INFO] Pinning versions
2020/09/01 08:34:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/[email protected]
2020/09/01 08:34:19 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/cloudflare@latest
go: github.com/caddy-dns/cloudflare latest => v0.0.0-20200811180534-4494da72fa56
2020/09/01 08:34:19 [INFO] Build environment ready
2020/09/01 08:34:19 [INFO] Building Caddy
2020/09/01 08:34:19 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /root/caddy -ldflags -w -s -trimpath
go: downloading github.com/smallstep/certificates v0.14.6
2020/09/01 08:34:38 [INFO] Build complete: caddy
2020/09/01 08:34:38 [INFO] Cleaning up temporary folder: /tmp/buildenv_2020-09-01-0834.242359201

So, the real reason is cloudflare-dns plugin dose not support caddy 2.1.1???

from cloudflare.

mholt avatar mholt commented on May 16, 2024

So, the real reason is cloudflare-dns plugin dose not support caddy 2.1.1???

More or less; we're in the middle of transitioning to support Caddy 2.2, which uses a new ACME library I wrote called acmez. It's a little awkward until the tags are made.

from cloudflare.

danihodovic avatar danihodovic commented on May 16, 2024

any update @mholt ?

from cloudflare.

mholt avatar mholt commented on May 16, 2024

@danihodovic On what?

from cloudflare.

danihodovic avatar danihodovic commented on May 16, 2024

Following the instructions on docker hub and using the cloudflare plugin:

/go/pkg/mod/github.com/smallstep/[email protected]/authority/provisioner/jwk.go:155:24: assignment mismatch: 3 variables but x509util.SplitSANs returns 4 values
/go/pkg/mod/github.com/smallstep/[email protected]/authority/provisioner/x5c.go:197:24: assignment mismatch: 3 variables but x509util.SplitSANs returns 4 values
2020/11/21 19:39:48 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2020-11-21-1938.415922164
2020/11/21 19:39:48 [FATAL] exit status 2
The command '/bin/sh -c xcaddy build                            --with github.com/caddy-dns/cloudflare@latest' returned a non-zero code: 1

from cloudflare.

mholt avatar mholt commented on May 16, 2024

Works for me. Make sure your local system and environment are not caching anything old or doing anything weird/unusual. (I have a clean Linux install with Go 1.15.3.)

$ xcaddy build                            --with github.com/caddy-dns/cloudflare@latest
2020/11/21 12:41:35 [INFO] Temporary folder: /tmp/buildenv_2020-11-21-1241.240599303
2020/11/21 12:41:35 [INFO] Writing main module: /tmp/buildenv_2020-11-21-1241.240599303/main.go
2020/11/21 12:41:35 [INFO] Initializing Go module
2020/11/21 12:41:35 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy 
go: creating new go.mod: module caddy
2020/11/21 12:41:35 [INFO] Pinning versions
2020/11/21 12:41:35 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2 
go: github.com/caddyserver/caddy/v2 upgrade => v2.2.1
2020/11/21 12:41:36 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/cloudflare@latest 
go: github.com/caddy-dns/cloudflare latest => v0.0.0-20200811180534-4494da72fa56
2020/11/21 12:41:36 [INFO] Build environment ready
2020/11/21 12:41:36 [INFO] Building Caddy
2020/11/21 12:41:36 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /home/matt/Downloads/caddy -ldflags -w -s -trimpath 
2020/11/21 12:41:44 [INFO] Build complete: caddy
2020/11/21 12:41:44 [INFO] Cleaning up temporary folder: /tmp/buildenv_2020-11-21-1241.240599303

from cloudflare.

danihodovic avatar danihodovic commented on May 16, 2024

Works with caddy 2.2.1, but not 2.1.1. Thanks

from cloudflare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.