Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go/internal/get: enable Azure DevOps Git repos to go get #41030

Closed
artbegolli opened this issue Aug 25, 2020 · 1 comment
Closed

cmd/go/internal/get: enable Azure DevOps Git repos to go get #41030

artbegolli opened this issue Aug 25, 2020 · 1 comment

Comments

@artbegolli
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.14.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/abegolli/go/bin"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"

What did you do?

Use go get to pull a repository in Azure DevOps without .git appended to the path

What did you expect to see?

The repository stored in $GOPATH or path added to go.mod

What did you see instead?

$ go get dev.azure.com/artbegolli/adogo/adogo
unrecognized import path "dev.azure.com/artbegolli/adogo/adogo": reading https://dev.azure.com/artbegolli/adogo/adogo?go-get=1: 203 Non-Authoritative Information

Azure DevOps repository clone paths do not include a .git suffix.

Microsoft outlines steps for go get command support in Azure DevOps repositories https://docs.microsoft.com/en-us/azure/devops/repos/git/go-get?view=azure-devops. Previous issues regarding _git in the path now have workarounds with the use of ssh paths.

The only outstanding problem is that of .git being required in your module path as Go treats ADO as a generic server here

regexp: lazyregexp.New(`(?P<root>(?P<repo>([a-z0-9.\-]+\.)+[a-z0-9.\-]+(:[0-9]+)?(/~?[A-Za-z0-9_.\-]+)+?)\.(?P<vcs>bzr|fossil|git|hg|svn))(/~?[A-Za-z0-9_.\-]+)*$`),
and expects clone paths to include a .git suffix.

@bcmills
Copy link
Contributor

bcmills commented Aug 25, 2020

Duplicate of #28236

@bcmills bcmills marked this as a duplicate of #28236 Aug 25, 2020
@bcmills bcmills closed this as completed Aug 25, 2020
@golang golang locked and limited conversation to collaborators Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants