8wDlpd.png
8wDFp9.png
8wDEOx.png
8wDMfH.png
8wDKte.png

无法从我的公共 bitbucket 存储库导入 golang 包

sohamsk 1月前

38 0

我正在尝试导入我的 golang 客户端库。文件夹结构 golang/gms go.mod src cmd gms main.go pkg...

我正在尝试导入我的 golang 客户端库。

文件夹结构

golang/
 gms
    go.mod
    src
        cmd
           gms
               main.go
        pkg
            globals
               globals.go
               logger.go
            httpclient
               client.go
               struct.go
            point
                point.go
                struct.go
 README.md

这是我的 go.mod 文件的内容

module bitbucket.company.com/users/rishavkumarj/gms-client-library/golang/gms

go 1.21.3

我的代码出现在网址上 https://bitbucket.company.com/bbdc/users/rishavkumarj/repos/gms-client-library/browse

但是当我尝试导入包时,出现了错误

rishavkumarj@go:~/fork/rishavkumarj/gms-client-library/golang/gms$ go get bitbucket.company.com/users/rishavkumarj/gms-client-library/golang/gms
go: bitbucket.company.com/users/rishavkumarj/gms-client-library/golang/gms: module bitbucket.company.com/users/rishavkumarj/gms-client-library/golang: reading https://artifactory.company.com/artifactory/api/go/zextgolangproxy-go-rel-virtual/bitbucket.company.com/users/rishavkumarj/gms-client-library/golang/@v/list: 404 

rishavkumarj@go:~/fork/rishavkumarj/gms-client-library/golang/gms$ GOPROXY="" go get bitbucket.company.com/users/rishavkumarj/gms-client-library/golang/gms
go: bitbucket.company.com/users/rishavkumarj/gms-client-library/golang/gms: unrecognized import path "bitbucket.company.com/users/rishavkumarj/gms-client-library/golang": parse https://bitbucket.company.com/users/rishavkumarj/gms-client-library/golang?go-get=1: no go-import meta tags (meta tag bitbucket.company.com/bbdc/users/rishavkumarj did not match import path bitbucket.company.com/users/rishavkumarj/gms-client-library/golang)
帖子版权声明 1、本帖标题:无法从我的公共 bitbucket 存储库导入 golang 包
    本站网址:http://xjnalaquan.com/
2、本网站的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
3、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
4、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
5、站长邮箱:yeweds@126.com 除非注明,本帖由sohamsk在本站《go》版块原创发布, 转载请注明出处!
最新回复 (0)
  • 看起来您正在使用代理从您自己的版本控制服务器获取模块 https://artifactory.company.com/artifactory/api/go/zextgolangproxy-go-rel-virtual ,请尝试设置 GOPRIVATE

    export GOPRIVATE=bitbucket.company.com
    

    然后再次运行 go get

    更多详细信息: https://go.dev/ref/mod#private-modules

  • rishavkumarj@go:~/fork/rishavkumarj/gms-client-library/golang/gms$ GOPRIVATE='bitbucket.company.com' 前往获取 bitbucket.company.com/users/rishavkumarj/repos/gms-client-library/golang/gms/pkg/globals

  • 错误:go:无法识别的导入路径\'bitbucket.company.com/users/rishavkumarj/repos/gms-client-library/golang/gms/pkg/globals\':解析 https://bitbucket.company.com/users/rishavkumarj/repos/gms-client-library/golang/gms/pkg/globals?go-get=1:没有 go-import 元标记(元标记 bitbucket.company.com/bbdc/users/rishavkumarj 与导入路径 bitbucket.company.com/users/rishavkumarj/repos/gms-client-library/golang/gms/pkg/globals 不匹配)

返回
作者最近主题: