mholt / caddy-webdav

WebDAV handler module for Caddy
Apache License 2.0
198 stars 22 forks source link

can not use xcaddy build caddy v2.4.3 with webdav #23

Closed cnkmmk closed 3 years ago

cnkmmk commented 3 years ago

I use xcaddy build caddy 2.4.3 with webdav, it is failed.

root@debian:~# /root/go/bin/xcaddy build v2.4.3 --with github.com/mholt/caddy-webdav 2021/07/07 10:15:03 [INFO] Temporary folder: /tmp/buildenv_2021-07-07-1015.138554826 2021/07/07 10:15:03 [INFO] Writing main module: /tmp/buildenv_2021-07-07-1015.138554826/main.go 2021/07/07 10:15:03 [INFO] Initializing Go module 2021/07/07 10:15:03 [INFO] exec (timeout=10s): /usr/bin/go mod init caddy go: creating new go.mod: module caddy 2021/07/07 10:15:03 [INFO] Pinning versions 2021/07/07 10:15:03 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2@v2.4.3 2021/07/07 10:15:23 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/mholt/caddy-webdav go: github.com/mholt/caddy-webdav upgrade => v0.0.0-20200916200058-c949b3226234 go: downloading google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c go: downloading github.com/smallstep/certificates v0.15.15 2021/07/07 10:15:29 [INFO] Build environment ready 2021/07/07 10:15:29 [INFO] Building Caddy 2021/07/07 10:15:29 [INFO] exec (timeout=0s): /usr/bin/go mod tidy go: downloading google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c go: downloading github.com/smallstep/certificates v0.15.15 go: downloading github.com/klauspost/compress v1.13.0 caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddypki imports github.com/smallstep/certificates/authority: github.com/smallstep/certificates@v0.15.15: reading https://proxy.golang.org/github.com/smallstep/certificates/@v/v0.15.15.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddypki imports github.com/smallstep/certificates/db: github.com/smallstep/certificates@v0.15.15: reading https://proxy.golang.org/github.com/smallstep/certificates/@v/v0.15.15.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver imports github.com/smallstep/certificates/acme: github.com/smallstep/certificates@v0.15.15: reading https://proxy.golang.org/github.com/smallstep/certificates/@v/v0.15.15.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver imports github.com/smallstep/certificates/acme/api: github.com/smallstep/certificates@v0.15.15: reading https://proxy.golang.org/github.com/smallstep/certificates/@v/v0.15.15.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver imports github.com/smallstep/certificates/acme/db/nosql: github.com/smallstep/certificates@v0.15.15: reading https://proxy.golang.org/github.com/smallstep/certificates/@v/v0.15.15.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver imports github.com/smallstep/certificates/authority/provisioner: github.com/smallstep/certificates@v0.15.15: reading https://proxy.golang.org/github.com/smallstep/certificates/@v/v0.15.15.zip: 403 Forbidden caddy imports github.com/mholt/caddy-webdav imports github.com/caddyserver/caddy/v2/modules/caddyhttp imports google.golang.org/genproto/googleapis/api/expr/v1alpha1: google.golang.org/genproto@v0.0.0-20210602131652-f16073e35f0c: reading https://proxy.golang.org/google.golang.org/genproto/@v/v0.0.0-20210602131652-f16073e35f0c.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddyhttp/standard imports github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip imports github.com/klauspost/compress/gzip: github.com/klauspost/compress@v1.13.0: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.0.zip: 403 Forbidden caddy imports github.com/caddyserver/caddy/v2/modules/standard imports github.com/caddyserver/caddy/v2/modules/caddyhttp/standard imports github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd imports github.com/klauspost/compress/zstd: github.com/klauspost/compress@v1.13.0: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.0.zip: 403 Forbidden 2021/07/07 10:15:32 [INFO] Cleaning up temporary folder: /tmp/buildenv_2021-07-07-1015.138554826 2021/07/07 10:15:32 [FATAL] exit status 1

mholt commented 3 years ago

If you update go.mod to use the latest version of Caddy (v2.4.3) does it work? https://github.com/mholt/caddy-webdav/blob/master/go.mod#L6

cnkmmk commented 3 years ago

I change the file /root/go/pkg/mod/github.com/mholt/caddy-webdav@v0.0.0-20200916200058-c949b3226234/go.mod, the result is same.

mholt commented 3 years ago

I don't know then. It works for me:

$ xcaddy build v2.4.3 --with github.com/mholt/caddy-webdav
2021/07/07 17:37:23 [INFO] Temporary folder: /Users/matt/Desktop/buildenv_2021-07-07-1737.507761088
2021/07/07 17:37:23 [INFO] Writing main module: /Users/matt/Desktop/buildenv_2021-07-07-1737.507761088/main.go
2021/07/07 17:37:23 [INFO] Initializing Go module
2021/07/07 17:37:23 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy 
go: creating new go.mod: module caddy
go: to add module requirements and sums:
    go mod tidy
2021/07/07 17:37:23 [INFO] Pinning versions
2021/07/07 17:37:23 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2@v2.4.3 
go: downloading github.com/caddyserver/caddy/v2 v2.4.3
go: downloading github.com/caddyserver/certmagic v0.14.0
go get: added github.com/caddyserver/caddy/v2 v2.4.3
2021/07/07 17:37:50 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/mholt/caddy-webdav 
go: downloading github.com/mholt/caddy-webdav v0.0.0-20200916200058-c949b3226234
go: downloading github.com/klauspost/cpuid v1.2.3
go: downloading github.com/marten-seemann/qtls-go1-17 v0.1.0-alpha.1
go get: added github.com/mholt/caddy-webdav v0.0.0-20200916200058-c949b3226234
2021/07/07 17:38:01 [INFO] Build environment ready
2021/07/07 17:38:01 [INFO] Building Caddy
2021/07/07 17:38:01 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy 
go: downloading github.com/stretchr/testify v1.7.0
go: downloading cloud.google.com/go v0.70.0
go: downloading google.golang.org/api v0.33.0
go: downloading google.golang.org/grpc v1.38.0
go: downloading github.com/kr/pretty v0.2.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
go: downloading go.opencensus.io v0.22.5
go: downloading google.golang.org/appengine v1.6.6
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
2021/07/07 17:38:07 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /Users/matt/Desktop/caddy -ldflags -w -s -trimpath 
2021/07/07 17:38:19 [INFO] Build complete: ./caddy
2021/07/07 17:38:19 [INFO] Cleaning up temporary folder: /Users/matt/Desktop/buildenv_2021-07-07-1737.507761088

It is probably some problem with your local environment. A Go forum might be a better place to ask for help with that.