-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: AWS CodeCommit repo URL incompatible with vgo major version import paths? #25792
Comments
The
|
@computermouth just as @ziyel mentioned, this is all happening pre- Also take a look at https://golang.org/cmd/go/#hdr-Remote_import_paths. I'll close this for now because I don't think there's a bug/issue per se, particularly not with |
Interesting, I've never seen the vcs type used in the imports before.
Having changed all the path references to use So I can only assume that |
Just to confirm, what do you mean by "the vcs type"? Quoting from the import paths link:
Back to the issue you're having:
Please can you include here the HTML |
By After reading the linked pages, it sounded like adding the Following the example from @ziyel :
As I mentioned before, CodeCommit has no organization/user namespacing in the URL. As such, if you were to open an account, and create a git repo called You mentioned that this happens before any git processing starts, so I was under the impression that adding the So it seemed to me that the following was kind of an oxymoron, where the
Reproducible command summary :
|
@computermouth I have to admit, I'd forgotten that I have no real experience with CodeCommit but I would make the following observations: You are looking to use the URL It's also unlikely that you'll be able to return custom The better thing to do here therefore would be to instead map a domain you own to the the CodeCommit repo via a custom import. Let's say you own the domain example.com and you want to map the import path
returns the
Your package main
import "fmt"
import "example.com/return2"
func main(){
fmt.Println(return2.Doit())
} |
Mmm, noted. I appreciate the suggested workaround. Given what we know here, should this then be kept open as a bug in vgo? Or should I expect that this is simply the way that the behavior will remain? If it's the latter, I wonder if this won't cause a more widespread failure when vgo is rolled into the go distribution. Assuming |
@rsc @bcmills - re-opening for a decision from you on this:
|
Duplicate of #25654 |
@oiooj thanks, I hadn't spotted #25654. I don't think this is quite a duplicate, however. Yes, the |
Keep in mind here, that this would mean tracking the list of AWS regions. It looks like there are approximately 20 right now. Adding the |
That was my first point; if we do want to support the import path parsing, the second point was dealing with the fact the import path has |
The latest vgo does use the same logic now as "go get", including support for ".git" to mark the end of the git repo portion of an import path. I don't believe the /v1/ in the repo URL matters at all. @computermouth could you Note that if you have a domain you like, you could serve the Go <meta> tags on that domain and point to the AWS git server, and then you won't be forced to have things like "us-east-1" in your import paths. (curl https://rsc.io/quote for example.) |
Going to assume this was fixed by reusing the existing go get resolver. |
Hi @rsc, sorry about the late reply. It's fixed with one small detail. Package imports as |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. I was initially reporting the issue on go1.10, but the issue persists on latest.
What operating system and processor architecture are you using (
go env
)?What did you do?
Created a private repository on AWS CodeCommit for a library.
Created a program to use it.
Created an ssh redirect in my
~/.gitconfig
Included this library
What did you expect to see?
Direct clones work just fine. Neither
go get
norvgo build
are able to import:What did you see instead?
Everything works flawlessly with private repos on Gitlab:
I have a sneaking suspicion that the cause is actually based in the way that AWS handles git authentication.
Note that the codecommit urls skip the
git@
. I presume that since I have yet to see any kind of restrictions in regards to repository names, and since my user/org is not accounted for in the repo URL, that the repository is presented to the user after some Amazon authentication middleware.But I thought I'd post this here anyways.
Love
vgo
, it's the package management tool Go has always needed, thanks for all your work!-- Ben
The text was updated successfully, but these errors were encountered: