In have a git repo in bitbucket.org
reponame/
.git/
integration1/
integration2/
integration-common/
└── util
├── go.mod
└── readascii.go
The module directory is a subdirectory of the git repository. The repository is tagged with v0.0.1
.
Here's the go.mod
module bitbucket.org/orgname/reponame/integration-common/util
go 1.14
When I do go get
for this module I get the following error
go get bitbucket.org/orgname/reponame/integration-common/util@v0.0.1
go: downloading bitbucket.org/orgname/reponame v0.0.1
go get bitbucket.org/orgname/reponame/integration-common/util@v0.0.1: module bitbucket.org/orgname/reponame@v0.0.1 found, but does not contain package bitbucket.org/orgname/reponame/integration-common/util
I can see the integration-common/util/
directory in bitbucket.org under the tag v0.0.1
if I look with the web browser. The go.mod has the contents shown above.
What is even more odd is that go get does manage to download the other directories in the repository (integration1/
and integration2/
). For some reason it thinks v0.0.1
doesn't contain the integration-common/
directory, even though bitbucket shows it there for that tag.
I download with ssh, not https, because https reqires 2fa on our bitbucket repo:
~/.gitconfig:
url "git@bitbucket.org:"]insteadOf = https://bitbucket.org/
I know bitbucket is weird when it comes to using go get. Is there something I missed, or is this a bug with go get and bitbucket?