The error message indicates that there is a connection issue when trying to initialize the Go module for the github.com/gin-gonic/gin package. It seems that the host 10.172.49.21 on port 8081 is refusing the connection.

Here are a few steps you can take to troubleshoot the issue:

  1. Check if the host 10.172.49.21 is accessible and running on port 8081. Make sure there are no firewall rules or network restrictions preventing the connection.

  2. Ensure that the Go module proxy or repository server at 10.172.49.21:8081 is properly configured and running. Verify that it supports the Go module protocol and can serve the required module versions.

  3. If you are behind a corporate network or using a proxy, make sure the necessary network configurations are in place for Go to access external resources. You might need to set environment variables like HTTP_PROXY and HTTPS_PROXY to the appropriate values.

  4. If you have a local Go proxy or module mirror configured, ensure that it is correctly set up and reachable.

If none of the above steps resolve the issue, it might indicate a problem with the server hosting the module or a temporary network issue. In such cases, you can try again later or contact the server administrator for further assistance

go mod初始化githubcomgin-gonicgin module githubcomgin-gonicgin Get http1017249218081repositorygolanggithubcomgin-gonicginvlist dial tcp 1017249218081 connect connection refused

原文地址: http://www.cveoy.top/t/topic/i0pl 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录