私有仓库的代码在本地有,但是没有这个仓库的权限,不是我自己的仓库,代码最初是开源的,之后设为私有了。
之前克隆了一份到本地,不知道怎么引用,纯小白 GoGoGo 。
go build
build my_project: cannot find module for path github.com/example/my_project/xxx/xxx/xxx
1
maichael 2020 年 8 月 11 日
你都没权限还能怎么办。
|
2
Vegetable 2020 年 8 月 11 日
把仓库上传到自己的 github 上,引用地址改一下
|
3
virusdefender 2020 年 8 月 11 日
git submodule
|
4
robinch 2020 年 8 月 11 日
读读代码
|
5
Jirajine 2020 年 8 月 11 日 via Android
|
6
AmrtaShiva 2020 年 8 月 11 日 via iPhone
编辑 go.mod
require github.com/example/my_project/xxx/xxx/xxx v0.0.0 replace github.com/example/my_project/xxx/xxx/xxx =>/你 clone 的本地地址 |
7
Leigg 2020 年 8 月 11 日 via Android
记得有个 GOPRIVATE 变量解决
|
8
reus 2020 年 8 月 11 日
|
9
iamverylovely OP |