英文:
Exporting dependencies from package which is existing vendor
问题
我是你的中文翻译助手,以下是翻译好的内容:
我对golang和glide依赖管理工具还不熟悉。我正在尝试在我公司的项目中运行glide install
命令。我遇到了关于go-xorm库的错误。
[ERROR] 更新github.com/go-xorm/xorm失败:无法获取仓库:正在克隆到'/Users/xxx/.glide/cache/src/https-github.com-go-xorm-xorm'...
remote: 仓库'go-xorm/xorm'已禁用。
remote: 请联系所有者检查他们的账户。
fatal: 无法访问'https://github.com/go-xorm/xorm/': 请求的URL返回错误: 403
: 退出状态 128
[ERROR] 检出软件包失败:无法获取仓库:正在克隆到'/Users/xxx/.glide/cache/src/https-github.com-go-xorm-xorm'...
remote: 仓库'go-xorm/xorm'已禁用。
remote: 请联系所有者检查他们的账户。
fatal: 无法访问'https://github.com/go-xorm/xorm/': 请求的URL返回错误: 403
: 退出状态 128
看起来我无法从GitHub下载它,因为所有者已将其禁用以进行克隆。
我该如何解决这个错误,或者是否有办法直接从本地的vendor文件夹导出,而不是从GitHub获取?我确定该包已经存在于我的本地vendor文件夹中。非常感谢!
英文:
I am new to golang and glide dependency management tool. I am trying to run glide install
in created my company project. I have met an error about go-xorm library.
[ERROR] Update failed for github.com/go-xorm/xorm: Unable to get repository: Cloning into '/Users/xxx/.glide/cache/src/https-github.com-go-xorm-xorm'...
remote: Repository `go-xorm/xorm' is disabled.
remote: Please ask the owner to check their account.
fatal: unable to access 'https://github.com/go-xorm/xorm/': The requested URL returned error: 403
: exit status 128
[ERROR] Failed to checkout packages: Unable to get repository: Cloning into '/Users/xxx/.glide/cache/src/https-github.com-go-xorm-xorm'...
remote: Repository `go-xorm/xorm' is disabled.
remote: Please ask the owner to check their account.
fatal: unable to access 'https://github.com/go-xorm/xorm/': The requested URL returned error: 403
: exit status 128
It's seem that I am not able to download it from github because the owner made it disabled to clone.
How can I fix this error or Is there any way to export directly from local vendor without fetching from github. I am sure that the package is already on my local vendor folder. Thank you so much!!!
答案1
得分: 1
这是因为XORM从Github(仓库仍然作为公共存档可用)迁移到Gitea,而不再使用github.com/go-xorm/xorm
,而是使用xorm.io/xorm
。
我建议完全停止使用glide
,并改用基于Go Modules的工作流程;但如果你必须使用它,你需要从你的glide.yaml
中移除github.com/go-xorm/xorm
,添加xorm.io/xorm
(你可以使用glide get
来完成),并在代码库中修复你的导入语句。
英文:
This is because XORM moved from Github (repo is still available as Public Archive) to Gitea and instead of github.com/go-xorm/xorm
they now use xorm.io/xorm
.
I'd recommend to stop using glide
completely and replace it with Go Modules based workflow; but if you must use it, you will need to remove github.com/go-xorm/xorm
from your glide.yaml
, add xorm.io/xorm
(you can use glide get
to do so) and fix your imports everywhere in codebase.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论