go get -u 的时候提示错误XXX is not using a known version control system

曲昊
  • 19

系统:win10 1903 Home
问题:在使用命令行工具安装Gin、goaddimport等等...出现报错
报错内容:
$ go get -u github.com/alecthomas/gometalinter
package github.com/alecthomas/gometalinter: directory "D:\GoProject\src\github.com\alecthomas\gometalinter" is not using a known version control system

$ go get -u github.com/mgechev/revive
package github.com/mgechev/revive: directory "D:\GoProject\src\github.com\mgechev\revive" is not using a known version control system

$ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
package github.com/golangci/golangci-lint/cmd/golangci-lint: directory "D:\GoProject\src\github.com\golangci\golangci-lint\cmd\golangci-lint" is not using a known version control system

$ go get -u github.com/zmb3/gogetdoc
package github.com/zmb3/gogetdoc: directory "D:\GoProject\src\github.com\zmb3\gogetdoc" is not using a known version control system

$ go get -u github.com/zmb3/goaddimport
package github.com/zmb3/goaddimport: directory "D:\GoProject\src\github.com\zmb3\goaddimport" is not using a known version control system

已知,检查了GOPATH、GOROOT、PATH配置均无问题。同时网上相同问题解决方案tool.git已有。已然出现该问题,谁知道该如何解决...
谢谢了!

回复
阅读 4k
1 个回答

你的电脑上有没有安装 git ?试试git --version能不能得到版本信息。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏