Open ljahier opened 1 year ago
Hi, unfortunately I cannot reproduce the problem.
This issue seems to be related. Can you try any of the suggestions there? Someone says the problem happens for big repositories, which might be the case here: mimetype has many test files.
I had the same problem.just set GOPROXY=direct
:
GOPROXY=direct go get github.com/gabriel-vasile/mimetype
Hello,
Issue Description: When running a
docker build -t my-app-name .
command, thego mod download
step is triggered to install project dependencies. However, an error is encountered during this process that prevents successful dependency installation. The specific error message is as follows:Expected Behavior: The
go mod download
step should successfully install the project dependencies without encountering any errors related to thegithub.com/gabriel-vasile/mimetype
dependency.Actual Behavior: The
go mod download
step encounters a403 Forbidden
error when trying to access the following URL:https://proxy.golang.org/github.com/gabriel-vasile/mimetype/@v/v1.4.2.zip
Additional Context:
When attempting to access the URL
https://proxy.golang.org/github.com/gabriel-vasile/mimetype/@v/v1.4.2.zip
directly from the browser on my laptop, I can confirm that I can access the URL without any issues. The zip file downloads successfully.Furthermore, when I use the
wget
command on my server (which is hosted at Hetzner and utilizes an ARM processor), I am also able to successfully download the zip file without encountering any access restrictions or errors.It seems that the issue is isolated to the environment of running a
docker build
on my server. It's puzzling that I can access the URL from various contexts except during the Docker build process. This might suggest that there could be a specific configuration or network-related factor within the Docker build environment that's causing this403 Forbidden
error. But I don't know why, because all others dependencies download wellI have the same issue when I run
go mod tidy
instead ofgo mod download
Dockerfile:
Environment Details: