Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
698 views
in Technique[技术] by (71.8m points)

download go module from bitbucket

I published Go module in internel bitbucket. Multiple team will use this module.

I tried command "go get -u -insecure bitbucket.xxx.xxx.com/tdvo/itt-oapm-golang-metrics" then getting below error

     package bitbucket.xxx.xxx.com/tdvo/itt-oapm-golang-metrics: unrecognized import path "bitbucket.xxx.xxx.com/tdvo/itt-oapm-golang-metrics": http/https fetch: Get "http://bitbucket.xxx.xxx.com/tdvo/itt-oapm-golang-metrics?go-get=1": dial tcp 10.68.204.3:80: connectex:
     A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
     

I also tried with "go get -u -insecure bitbucket.xxx.xxx.com/tdvo/itt-oapm-golang-metrics.git" got different below error

     # cd .; git clone -- git://bitbucket.xxx.xxx.com/tdvo/itt-oapm-golang-metrics C:xxxworkspaceGO_Workspacesrcitbucket.xxx.xxx.comdvoitt-oapm-golang-metrics.git
    Cloning into 'C:hagwanworkspaceGO_Workspacesrcitbucket.xxx.xxx.comdvoitt-oapm-golang-metrics.git'
    fatal: unable to connect to bitbucket.xxx.xxx.com:
    bitbucket.xxx.xxx.com[0: 10.68.204.3]: errno=Invalid argument
 

Also update .gitconfig file with [url "ssh://git@bitbucket.xxx.xxx.com:7999/"] insteadOf = https:bitbucket.xx.xx.com:8443/dcifgit/scm/

I also set GOPRIVATE=https://bitbucket.xxx.xxx.com/. Can anyone help to download module from bitbucket.

question from:https://stackoverflow.com/questions/66062447/download-go-module-from-bitbucket

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...