go get 拉取报错The project you were looking for could not be found的解决方法
被这玩意折腾了一下午
报错提示
remote: The project you were looking for could not be found or you don’t have permission to view it. fatal: repository ‘https:/gitlab.xxx.net/xxx/yyy/zzz.git’ not found
看起来是项目不存在或者没权限,实际这两者都是正常的,但就是go get报错,奇怪的很
排查记录
GOPRIVATE导致
网上说这是因为私有库的原因,要使用git config增加instead等等,但PRIVATE问题这个问题的报错还是有点不一样的。所以无效
GOPROXY导致
无效,没啥关系
增加参数-x, go get 问题?
文档说go get -x 可以看到go get具体执行时的debug日志。我试下了,还真有用,显示的get 路径是这样的: