I'm attempting to install a private repository as a golang module.
After reading the Microsoft blog post. I've attempted to do it locally.
I've updated the local .gitconfig with
[url "[email protected]:v3/<my org>/"]
insteadOf = https://dev.azure.com/<my org>/
Also exported to my environment:
export GOPRIVATE=dev.azure.com/<my org>/
The repository contains a go.mod
file with the following header:
module dev.azure.com/<my-org>/<project>/<repo>
go 1.18
When I attempt to install the module via:
go get -v dev.azure.com/<my-org>/<project>/<repo>.git@develop
It fails with:
go: dev.azure.com/<my-org>/<project>/<repo>[email protected]: parsing go.mod:
module declares its path as: dev.azure.com/<my-org>/<project>/<repo>
but was required as: dev.azure.com/<my-org>/<project>/<repo>.git
However, if I remove the .git
at the end it fails with:
203 Non-Authoritative Information
What's the appropriate way of importing private modules