我想为我本地的项目配置 GoLang GB 编译器。基于 url 中给出的文档我正在尝试使用命令获取 gb 编译器
它的返回状态代码 128。我无法理解这里发生了什么,因为没有解决此问题的引用资料。
添加 GIT_CURL_VERBOSE=1 或 2 没有帮助,因为它没有提供任何其他有值(value)的细节作为输出。
$ GIT_CURL_VERBOSE=1 go get -u -v github.com/constabulary/gb/...
$ github.com/constabulary/gb (download)
$ # cd .; git clone https://github.com/constabulary/gb
C:\work\GitHub\GoLib\src\github.com\constabulary\gb
Cloning into 'C:\work\GitHub\GoLib\src\github.com\constabulary\gb'...
package github.com/constabulary/gb/...: exit status 128
仍然得到avove输出
下面是不使用-u时的输出
$ GIT_TRACE=2 go get -v github.com/constabulary/gb/...
github.com/constabulary/gb (download)
# cd .; git clone https://github.com/constabulary/gb
C:\work\GitHub\GoLib\src\github.com\constabulary\gb
17:20:25.818538 git.c:328 trace: built-in: git 'clone'
'https://github.com/constabulary/gb' 'C:\work\GitHub\GoLib\
src\github.com\constabulary\gb'
17:20:25.867542 run-command.c:626 trace: run_command: 'remote-https'
'origin' 'https://github.com/constabulary/gb'
Cloning into 'C:\work\GitHub\GoLib\src\github.com\constabulary\gb'...
17:20:25.970553 git.c:560 trace: exec: 'git-remote-https'
'origin' 'https://github.com/constabulary/gb'
17:20:25.970553 run-command.c:626 trace: run_command: 'git-remote-
https' 'origin' 'https://github.com/constabulary/gb'
package github.com/constabulary/gb/...: exit status 128
最佳答案
我尝试了几天来解决这个问题。 在我的配置中,我在组织的 GitHub 上,我试图获取的代码库来自 github.com。所以我认为这可能是导致问题的原因。但事实并非如此。
我怀疑是git配置有问题。因为甚至无法访问组织的 github 帐户。我从多个线程尝试了很多解决方案.. 没有任何效果。
然后我最终从我的机器上卸载了 GitHub 和 tortoise git,然后重新安装。 并从头开始在我的机器上完成了完整的 git 配置设置。
成功了。
当我去卸载 git 时,首先确定了导致该问题的原因。安装日期是问题开始的日期。所以我怀疑是在不知不觉中为 git 安装了一些错误的更新,这导致了这个问题。
关于github - 从 Github 位置获取 go 包时克隆 git 存储库时退出状态 128,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46887802/