go get 拉取报错The project you were looking for could not be found的解决方法

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 路径是这样的:

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
当你在使用git pull命令时,如果你看到报错信息是"remote: The project you were looking for could not be found or you don't have permission to view it",这说明你要拉取的项目要么不存在,要么你没有权限访问它。这个错误通常有以下几个可能的原因: 1. 项目不存在: 你可能输入了错误的项目地址或者项目已被删除。请确保你输入的项目地址是正确的,并且项目确实存在。 2. 权限问题: 如果你没有权限访问该项目,你将无法拉取它。请与项目管理员或拥有者联系,以获取适当的权限。 为了解决这个问题,你可以尝试以下几个步骤: 1. 确认项目地址: 确保你输入的项目地址是正确的,没有拼写错误或者其他问题。 2. 检查权限: 确保你有权限访问该项目。如果你不确定,可以联系项目管理员或拥有者。 3. 检查凭证: 如果你曾经使用过凭证来访问项目,可能出现了凭证问题。你可以尝试删除凭证,并重新配置git。使用以下命令删除凭证:git config --unset credential.helper 总结来说,当你在使用git pull命令时遇到"remote: The project you were looking for could not be found or you don't have permission to view it"的错误信息,你可以确认一下项目地址是否正确,检查一下你是否具有访问该项目的权限,并且尝试删除凭证并重新配置git。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [git clone时报错remote: The project you were looking for could not be found or you don‘t have ...](https://blog.csdn.net/qq_64436918/article/details/131638378)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [解决git clone代码,报错remote: The project you were looking for could not be found or you don‘t](https://blog.csdn.net/Robergean/article/details/125997637)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值