V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
PiersSoCool
V2EX  ›  Go 编程语言

go module 真的是...

  •  
  •   PiersSoCool · 2019-05-15 21:36:25 +08:00 · 4169 次点击
    这是一个创建于 1798 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Jenkins 上 go get 一直失败

    后来发现 https clone,私有仓库怎么办

    搞了一天才发现是这个问题 https://github.com/golang/go/issues/26134

    这样才能解决问题

    git config --global url."[email protected]:".insteadOf "https://github.com/"

    一天的时间啊

    11 条回复    2019-05-16 11:48:13 +08:00
    YakuMioto
        1
    YakuMioto  
       2019-05-15 21:54:18 +08:00 via Android
    这个问题能干一天,也是服气的…
    zwh2698
        2
    zwh2698  
       2019-05-15 22:21:33 +08:00 via Android
    兄弟你英文不好还是怎么?那是有提示呀。看来你们领导给你工作不饱和呀
    wweir
        3
    wweir  
       2019-05-15 22:57:15 +08:00
    git config --global credential.helper store
    GeruzoniAnsasu
        4
    GeruzoniAnsasu  
       2019-05-15 23:26:35 +08:00 via Android   ❤️ 1
    是 go get 的锅
    当时遇到这个问题也花了我两三小时,主要 import 的东西有 github 的也有内网 git 的,还有个内网弃用 302 掉的地址,写代码宿主机和 build docker 镜像里的 gopath 还不一样,各种没意义的折腾
    blless
        5
    blless  
       2019-05-15 23:28:17 +08:00 via Android
    blless
        6
    blless  
       2019-05-15 23:28:52 +08:00 via Android
    啊 看错…我还以为是拉不到
    PiersSoCool
        7
    PiersSoCool  
    OP
       2019-05-16 00:15:57 +08:00
    @zwh2698 提示 unknown revison 查了半天没找到原因 后来还是 go build -x 去查找命令的
    PiersSoCool
        8
    PiersSoCool  
    OP
       2019-05-16 00:17:12 +08:00
    @GeruzoniAnsasu 是的,我在搞 Jenkins,代码死活都没法 pull 下来,所以很烦,的确很没有意义,1.13 要优化之后就没这问题了吧,很多人提这个 issue
    alexmy
        9
    alexmy  
       2019-05-16 10:30:14 +08:00
    看标题我还以为你说是 go mod -replace 的问题,一堆拉不下来,也不明白大天朝把 golang.org 这个也屏蔽了干嘛。
    Vegetable
        10
    Vegetable  
       2019-05-16 10:37:01 +08:00
    @alexmy 谷歌家的地址是白名单模式,只有个别的给你放出来,其他通杀呗
    reus
        11
    reus  
       2019-05-16 11:48:13 +08:00
    module 系统出来之前我就一直用 github 的私有仓库,import path 很多是私有仓库的地址,没遇到过问题,可能是之前就配置过验证了。用 git config --global credential.helper store 之类的方法。

    所以 module 出来之后也没遇到过问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   947 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:16 · PVG 05:16 · LAX 14:16 · JFK 17:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.