远程与logrus包的VCS端点不匹配

huangapple go评论77阅读模式
英文:

Remote does match the VCS endpoint for logrus package

问题

这里发生了一些奇怪的事情,我无法弄清楚。

我在使用Glide管理我的依赖项,但有一个包让我很困扰。我添加了github.com/sirupsen/logrus包用于日志记录,然后运行了glide up命令,结果出现了以下错误:

[INFO] 正在下载依赖项,请稍候...
[INFO] --> 正在获取 github.com/bgentry/speakeasy 的更新。
[INFO] --> 正在获取 github.com/sirupsen/logrus 的更新。
[ERROR] 获取 github.com/sirupsen/logrus 的更新失败:远程地址与版本控制系统的终端不匹配。
[ERROR] 无法更新包:远程地址与版本控制系统的终端不匹配。

我进行了大量的搜索,通常这与仓库更改名称或目标有关,但在这种情况下并没有发生。那么可能是什么原因导致这个问题呢?

这是我的glide.lock文件内容:

hash: fb99f00e96f2316b9acbe5892497bbc46e936bd2822dba68e5bf1aef553d63cc
updated: 2017-03-12T18:55:33.370219633Z
imports:

  • name: github.com/fatih/structs
    version: a720dfa8df582c51dee1b36feabb906bde1588bd
  • name: github.com/fsnotify/fsnotify
    version: a904159b9206978bb6d53fcc7a769e5cd726c737
  • name: github.com/hashicorp/errwrap
    version: 7554cd9344cec97297fa6649b055a8c98c2a1e55
  • name: github.com/hashicorp/go-cleanhttp
    version: 3573b8b52aa7b37b9358d966a898feb387f62437
  • name: github.com/hashicorp/go-multierror
    version: ed905158d87462226a13fe39ddf685ea65f1c11f
  • name: github.com/hashicorp/go-rootcerts
    version: 6bb64b370b90e7ef1fa532be9e591a81c3493e00
  • name: github.com/hashicorp/hcl
    version: 372e8ddaa16fd67e371e9323807d056b799360af
    subpackages:

    • hcl/ast
    • hcl/parser
    • hcl/scanner
    • hcl/strconv
    • hcl/token
    • json/parser
    • json/scanner
    • json/token
  • name: github.com/hashicorp/vault
    version: ebb798ec1b2c93a4607d44438c6f56438a17b4cc
    subpackages:

    • api
    • helper/compressutil
    • helper/jsonutil
  • name: github.com/inconshreveable/mousetrap
    version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
  • name: github.com/magiconair/properties
    version: b3b15ef068fd0b17ddf408a23669f20811d194d2
  • name: github.com/mitchellh/go-homedir
    version: b8bc1bf767474819792c23f32d8286a45736f1c6
  • name: github.com/mitchellh/mapstructure
    version: db1efb556f84b25a0a13a04aad883943538ad2e0
  • name: github.com/pelletier/go-buffruneio
    version: df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d
  • name: github.com/pelletier/go-toml
    version: d1fa2118c12c44e4f5004da216d1efad10cb4924
  • name: github.com/sethgrid/pester
    version: 2c5fb962da6113d0968907fd81dba3ca35151d1c
  • name: github.com/spf13/afero
    version: 72b31426848c6ef12a7a8e216708cb0d1530f074
    subpackages:

    • mem
  • name: github.com/spf13/cast
    version: d1139bab1c07d5ad390a65e7305876b3c1a8370b
  • name: github.com/spf13/cobra
    version: fcd0c5a1df88f5d6784cb4feead962c3f3d0b66c
  • name: github.com/spf13/jwalterweatherman
    version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66
  • name: github.com/spf13/pflag
    version: 5ccb023bc27df288a957c5e994cd44fd19619465
  • name: github.com/spf13/viper
    version: 5ed0fc31f7f453625df314d8e66b9791e8d13003
  • name: golang.org/x/net
    version: e90d6d0afc4c315a0d87a568ae68577cc15149a0
    subpackages:

    • http2
    • http2/hpack
    • lex/httplex
  • name: golang.org/x/sys
    version: 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9
    subpackages:

    • unix
  • name: golang.org/x/text
    version: 2910a502d2bf9e43193af9d68ca516529614eed3
    subpackages:

    • transform
    • unicode/norm
  • name: gopkg.in/yaml.v2
    version: 53feefa2559fb8dfa8d81baad31be332c97d6c77
    testImports: []

我尝试删除glide.lockglide.yaml文件,从头开始,但没有解决。有什么想法吗?

英文:

Something weird is happening here, and I can't figure it out.

I'm using glide for my dependencies, and there's one package giving me grief. I added the github.com/sirupsen/logrus package for logging, and then ran glide up. This happened:

[INFO]	Downloading dependencies. Please wait...
[INFO]	--> Fetching updates for github.com/bgentry/speakeasy.
[INFO]	--> Fetching updates for github.com/sirupsen/logrus.
[ERROR]	Update failed for github.com/sirupsen/logrus: The Remote does not match the VCS endpoint
[ERROR]	Could not update packages: The Remote does not match the VCS endpoint

Now I did a bunch of googling, and this is usually related to repos changing names or destination, but this didn't happen in this case. So what might be causing it?

Here's my glide.lock:

hash: fb99f00e96f2316b9acbe5892497bbc46e936bd2822dba68e5bf1aef553d63cc
updated: 2017-03-12T18:55:33.370219633Z
imports:
- name: github.com/fatih/structs
  version: a720dfa8df582c51dee1b36feabb906bde1588bd
- name: github.com/fsnotify/fsnotify
  version: a904159b9206978bb6d53fcc7a769e5cd726c737
- name: github.com/hashicorp/errwrap
  version: 7554cd9344cec97297fa6649b055a8c98c2a1e55
- name: github.com/hashicorp/go-cleanhttp
  version: 3573b8b52aa7b37b9358d966a898feb387f62437
- name: github.com/hashicorp/go-multierror
  version: ed905158d87462226a13fe39ddf685ea65f1c11f
- name: github.com/hashicorp/go-rootcerts
  version: 6bb64b370b90e7ef1fa532be9e591a81c3493e00
- name: github.com/hashicorp/hcl
  version: 372e8ddaa16fd67e371e9323807d056b799360af
  subpackages:
  - hcl/ast
  - hcl/parser
  - hcl/scanner
  - hcl/strconv
  - hcl/token
  - json/parser
  - json/scanner
  - json/token
- name: github.com/hashicorp/vault
  version: ebb798ec1b2c93a4607d44438c6f56438a17b4cc
  subpackages:
  - api
  - helper/compressutil
  - helper/jsonutil
- name: github.com/inconshreveable/mousetrap
  version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
- name: github.com/magiconair/properties
  version: b3b15ef068fd0b17ddf408a23669f20811d194d2
- name: github.com/mitchellh/go-homedir
  version: b8bc1bf767474819792c23f32d8286a45736f1c6
- name: github.com/mitchellh/mapstructure
  version: db1efb556f84b25a0a13a04aad883943538ad2e0
- name: github.com/pelletier/go-buffruneio
  version: df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d
- name: github.com/pelletier/go-toml
  version: d1fa2118c12c44e4f5004da216d1efad10cb4924
- name: github.com/sethgrid/pester
  version: 2c5fb962da6113d0968907fd81dba3ca35151d1c
- name: github.com/spf13/afero
  version: 72b31426848c6ef12a7a8e216708cb0d1530f074
  subpackages:
  - mem
- name: github.com/spf13/cast
  version: d1139bab1c07d5ad390a65e7305876b3c1a8370b
- name: github.com/spf13/cobra
  version: fcd0c5a1df88f5d6784cb4feead962c3f3d0b66c
- name: github.com/spf13/jwalterweatherman
  version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66
- name: github.com/spf13/pflag
  version: 5ccb023bc27df288a957c5e994cd44fd19619465
- name: github.com/spf13/viper
  version: 5ed0fc31f7f453625df314d8e66b9791e8d13003
- name: golang.org/x/net
  version: e90d6d0afc4c315a0d87a568ae68577cc15149a0
  subpackages:
  - http2
  - http2/hpack
  - lex/httplex
- name: golang.org/x/sys
  version: 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9
  subpackages:
  - unix
- name: golang.org/x/text
  version: 2910a502d2bf9e43193af9d68ca516529614eed3
  subpackages:
  - transform
  - unicode/norm
- name: gopkg.in/yaml.v2
  version: 53feefa2559fb8dfa8d81baad31be332c97d6c77
testImports: []

I've tried deleting the glide.lock and glide.yaml and starting from scratch, with no relief. Any ideas?

答案1

得分: 2

import "github.com/sirupsen/logrus" 是正确的。要清除 glide 缓存,可以执行 glide install --force

英文:

import "github.com/sirupsen/logrus" is correct. To bust the glide cache, do glide install --force

答案2

得分: 1

最终这真的很愚蠢。

sirupsen包要求你的导入语句中Sirupse的首字母要大写。

我将这个改成了:

import "github.com/Sirupsen/logrus"

然后它就起作用了!

英文:

This was really stupid in the end.

The sirupsen package expects your import to have an upper case s at the beginning of Sirupse in the import.

I changed this:

import "github.com/sirupsen/logrus"

to this

import "github.com/Sirupsen/logrus"

And it worked!

huangapple
  • 本文由 发表于 2017年3月16日 01:02:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/42816235.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定