https://golang.org/ref/mod#vcs-version 3rd paragraph

> If a module is defined in a subdirectory within the repository, that is, 
the module subdirectory 
<https://golang.org/ref/mod#glos-module-subdirectory> portion of the module 
path is not empty, then each tag name must be prefixed with the module 
subdirectory, followed by a slash. For example, the 
module golang.org/x/tools/gopls is defined in the gopls subdirectory of the 
repository with root path golang.org/x/tools. The version v0.4.0 of that 
module must have the tag named gopls/v0.4.0 in that repository.

On Sunday, November 8, 2020 at 2:34:15 AM UTC+1 dean.w....@gmail.com wrote:

> In my git repo (bitbucket.org) I have
>
> 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.
>
> Heres the go.mod
>
> module bitbucket.org/orgname/reponame/integration-common/util
> go 1.14
>
> When I do a go get for this module I get the following error:
>
> go get bitbucket.org/orgname/reponame/integration-common/ut...@v0.0.1 
> <http://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/ut...@v0.0.1 
> <http://bitbucket.org/orgname/reponame/integration-common/util@v0.0.1>: 
> module bitbucket.org/orgname/repo...@v0.0.1 
> <http://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 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 have to use ssh instead of https because our private repos on 
> bitbucket.org require 2fa.  I have this in my ~/.gitconfig:
>
> url "g...@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 the a bug with go get and bitbucket?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/93bbadb4-eb9f-4acb-aefe-41a4aa2badccn%40googlegroups.com.

Reply via email to