douxing1850 2018-11-20 20:29
浏览 16

如何指向本地存储库而不是外部存储库

We are using dep ensure fo vendoring the dependencies for our project. Now in you system we can't access the external sites and that's the reason we mirrored the repo to our internal sites. The issue I am facing now is, though the Gopkg.tml file I am specifying the mirror repo as a constraint, dep is always going to external site for downloading the dependencies.

e.g. snippet from my Gopkg.tml file :

    required = [
        "github.com/dimiro1/banner",
        "github.com/go-openapi/errors",
        "go.uber.org/zap"
]
[[constraint]]
  branch = "master"
  name = "go.uber.org/zap"
  source = "<mirrored location in internal gitlab>"

The error I am hitting while ‘dep ensure’ is :

The following issues were found in Gopkg.toml:

✗ unable to deduce repository and source type for "go.uber.org/zap": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go.uber.org/zap?go-get=1": Get http://go.uber.org/zap?go-get=1: dial tcp 127.0.0.1:80: connect: connection refused

ProjectRoot name validation failed

Any idea how to solve this issue.

Thanks, Shruti

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题
    • ¥20 win11修改中文用户名路径
    • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
    • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
    • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
    • ¥15 帮我写一个c++工程