Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go version go1.11 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env
)?
GOOS="linux"
GOARCH="amd64"
What did you do?
I attempted to go get from a private bitbucket repository.
- add the following to ~/.gitconfig
[url "[email protected]:"]
insteadOf = https://bitbucket.org/
- add the following to ~/.ssh/config
Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_bitbucket
StrictHostKeyChecking no
-
ensure that a valid ssh key exists for bitbucket,
~/.ssh/id_bitbucket
-
use
go get
on a private bitbucket repo with modules enabled
What did you expect to see?
I expected the private repository to be pulled to the appropriate ${GOPATH}/pkg/mod
directory.
What did you see instead?
go: bitbucket.org/myprivaterepo/[email protected]: https://api.bitbucket.org/2.0/repositories/myprivaterepo/projectname?fields=scm: 403 Forbidden
In the golang-nuts
group, Russ had previous posted that this was an issue and could be resolved by hand. With the advent of modules, manually checking out the correct version and putting it into the correct location becomes way more problematic.