我在启动子模块时遇到了问题,我用"git submodule add“创建的。
我试过了:
git clone --recursive或
git clone —recurse-submodules -j8或
git submodule init
git submodule update或
git submodule status或
git submodule deinit --all
git submodule init 每次输出为空时
我的.gitmodules(使用git子模块添加...创建):
[submodule "vendor/src/github.com/gorilla/mux"]
path = vendor/src/github.com/gorilla/mux
url = https://github.com/gorilla/mux
[submodule "vendor/src/github.com/auth0/go-jwt-middleware"]
path = vendor/src/github.com/auth0/go-jwt-middleware
url = https://github.com/auth0/go-jwt-middleware
[submodule "vendor/src/github.com/dgrijalva/jwt-go"]
path = vendor/src/github.com/dgrijalva/jwt-go
url = https://github.com/dgrijalva/jwt-go
[submodule "vendor/src/github.com/urfave/negroni"]
path = vendor/src/github.com/urfave/negroni
url = https://github.com/urfave/negroni
[submodule "vendor/src/github.com/gorilla/handlers"]
path = vendor/src/github.com/gorilla/handlers
url = https://github.com/gorilla/handlers
[submodule "vendor/src/github.com/sirupsen/logrus"]
path = vendor/src/github.com/sirupsen/logrus
url = https://github.com/Sirupsen/logrus
[submodule "vendor/src/github.com/couchbase/gocb"]
path = vendor/src/github.com/couchbase/gocb
url = https://github.com/couchbase/gocb
[submodule "vendor/src/github.com/google/uuid"]
path = vendor/src/github.com/google/uuid
url = https://github.com/google/uuid
[submodule "vendor/src/github.com/opentracing/opentracing-go"]
path = vendor/src/github.com/opentracing/opentracing-go
url = https://github.com/opentracing/opentracing-go
[submodule "vendor/src/github.com/golang/snappy"]
path = vendor/src/github.com/golang/snappy
url = https://github.com/golang/snappy
[submodule "vendor/src/golang.org/x/net"]
path = vendor/src/golang.org/x/net
url = https://github.com/golang/net
[submodule "vendor/src/golang.org/x/text"]
path = vendor/src/golang.org/x/text
url = https://github.com/golang/text
[submodule "vendor/src/github.com/satori/go.uuid"]
path = vendor/src/github.com/satori/go.uuid
url = https://github.com/satori/go.uuid我使用的是Git版本2.19.2.windows.1
我做错了什么?
发布于 2018-11-24 23:44:00
每次添加子模块时,您都应该看到相应的子文件夹被创建/填充了您所引用的远程存储库的内容。
因此,供应商/src/github.com/gorilla/mux应该填写为https://github.com/auth0/go-jwt-middleware
一旦完成,由于没有其他修改,像git submodule update/init/status这样的命令将不会返回任何内容:初始化/更新已经完成,并且状态没有要报告的内容。
但首先尝试go 1.11 modules:go mod vendor将为您提供服务,并避免Git子模块,您可能不需要在常规的go项目中使用这些模块。
从那里开始:go build -mod=vendor将足以构建您的项目。
https://stackoverflow.com/questions/53457237
复制相似问题