I get this error
x509: certificate signed by unknown authority
when I try to put an object to Spaces using access keys in a docker container. I can get files just fine, and I can put files from my local machine (not in a docker container). I’m using the minio package from a golang app. This happens even with ssl=false. Is it looking for a cert only on puts?
Here’s what my code looks like
endpoint := "sfo3.digitaloceanspaces.com"
bucket := "mybucket"
ssl := false
client, err := minio.New(endpoint, accessKey, secKey, ssl)
if err != nil {
fmt.Println(err)
return nil
}
//this get works fine
obj, err := client.GetObject(bucket, fileName, minio.GetObjectOptions{})
if err != nil {
fmt.Println(err)
return nil
}
reader := bytes.NewReader(contents)
//this put fails
_, err = client.PutObject(bucket, "test.jpeg", reader, reader.Size(), minio.PutObjectOptions{})
if err != nil {
fmt.Println(err) //this is where I get the error
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
There has been a similar problem reported here:
The suggested solution was to update your CA certificates as described here:
http://manpages.ubuntu.com/manpages/bionic/man8/update-ca-certificates.8.html
And also try to update your packages too just in case.
Let me know how it goes.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
