Getting unknown URIs field error on ./build
azharmalik3 opened this issue · 2 comments
azharmalik3 commented
Here is the full error description:
gopath/src/github.com/square/certstrap/pkix/cert_auth.go:147:14: authTemplate.URIs undefined (type x509.Certificate has no field or method URIs)
gopath/src/github.com/square/certstrap/pkix/cert_auth.go:147:28: rawCsr.URIs undefined (type *x509.CertificateRequest has no field or method URIs)
gopath/src/github.com/square/certstrap/pkix/cert_host.go:98:14: hostTemplate.URIs undefined (type x509.Certificate has no field or method URIs)
gopath/src/github.com/square/certstrap/pkix/cert_host.go:98:28: rawCsr.URIs undefined (type *x509.CertificateRequest has no field or method URIs)
gopath/src/github.com/square/certstrap/pkix/csr.go:118:7: unknown field 'URIs' in struct literal of type x509.CertificateRequest
csstaub commented
Please upgrade to the latest version of Go, let us know if the error persists.
mllives commented
@azharmalik3 @csstaub
Hi. I had a same issue. And when I updated my Go version to 1.12 , there was another issue.The output like this:(I got the script form https://github.com/cloudfoundry-attic/cf-release/blob/master/scripts/generate-consul-certs )
root@ff:~# ./generate-consul-certs.sh
- dirname ./generate-consul-certs.sh
- scripts_folder=.
- go get -v github.com/square/certstrap
github.com/square/certstrap (download)
github.com/square/certstrap/vendor/golang.org/x/sys/unix
github.com/square/certstrap/vendor/golang.org/x/crypto/ssh/terminal
github.com/square/certstrap/vendor/github.com/howeyc/gopass
github.com/square/certstrap/pkix
github.com/square/certstrap/depot
github.com/square/certstrap/vendor/github.com/urfave/cli
github.com/square/certstrap/cmd
github.com/square/certstrap - depot_path=consul-certs
- mkdir -p consul-certs
- ./generate_ca_cert --common-name consulCA --depot-path consul-certs --output-file server-ca
./generate-consul-certs.sh: 14: ./generate-consul-certs.sh: ./generate_ca_cert: not found
I had seen another version script from https://github.com/cloudfoundry-incubator/consul-release/blob/master/scripts/generate-certs. And the result of this script was:
root@ff:~# ./generate-certs.sh
- go get -v github.com/square/certstrap
- depot_path=consul-certs
- mkdir -p consul-certs
- certstrap --depot-path consul-certs init --passphrase --common-name consulCA
./generate-certs.sh: 13: ./generate-certs.sh: certstrap: not found
Thanks!