为什么我需要登录GitHub?

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

Why do I need to log in to Github

问题

因为xlsx标签v1.1.0不包含最新功能,所以我使用以下命令将xlsx包更新到master版本:

# go get github.com/bingoohuang/xlsx@master
Username for 'https://github.com':

为什么我仍然需要登录才能下载GitHub上的公共代码?当我使用其他go get命令下载包时,这种情况并不会发生。

奇怪的是,我可以在Windows上执行该命令,但在CentOS 7上会出现上述登录问题。

是什么原因导致了这种情况?非常感谢您的帮助。

英文:

Because xlsx tag v1.1.0 does not contain the latest features, I use the following command to update the xlsx package to master

# go get github.com/bingoohuang/xlsx@master
Username for 'https://github.com':

Why do I still need to login to download the github public code, this does not happen when I download packages from other go get

The strange thing is that I can execute it on windows, but the above login question occurs on centos7.

what caused this to happen? I really appreciate any help with this.

答案1

得分: 1

看起来 github.com/bingoohuang/xlsx@master 依赖于 github.com/bingoohuang/go-yaml,但该依赖要么不存在,要么是私有的。

由于私有仓库会导致 GitHub 返回 404 错误,很可能是这个缺失的仓库导致 go get 命令出现密码提示。

对于没有缺失依赖的库(例如 go get github.com/rs/zerolog@master),go get 命令可以正常工作。

英文:

It looks like github.com/bingoohuang/xlsx@master depends on github.com/bingoohuang/go-yaml, which either does not exist or is private.

Because GitHub responds with a 404 error for private repositories, it is likely this missing repository is causing go get to issue a password prompt.

A go get for a library without missing dependencies (e.g., go get github.com/rs/zerolog@master) works without a problem.

huangapple
  • 本文由 发表于 2022年8月8日 17:04:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/73275356.html
匿名

发表评论

匿名网友

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

确定