go: x/tools/go/vcs: vcs.go does not support private repositories like GitHub Enterprise & GitLab. It is too restrictive because of regex pattern validation
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
1.8.3
What operating system and processor architecture are you using (go env)?
GOHOSTOS = darwin GOARCH = amd64
What did you do?
If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best.
What did you expect to see?
We are unable to use the VCS tool with GitHub Enterprise URLs, GitLab URLs etc. These are git repositories and they need to be supported
What did you see instead?
GitHub Enterprise, GitLab Enterprise URLs being supported.
I have an idea for this. Instead of regex validation, we can loop through the various known VCS PingCmds to determine the type of repository. When a positive result is received, we break out of the loop and continue repository processing based on the determined repository type. If you’re okay with this idea, I am ready to make a PR.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (5 by maintainers)
When you say
It’s really helpful if you can include the command you typed and the output you received. We want to help, but we can’t see your screen.
Also, @tariq1890 your code is most likely going to hit this branch of the
vcsPathschecker:For my GHE setup, our URL is git.<ver>.<company>.com and we trigger the last entry in the list. I suspect your site is doing the same, and if that’s indeed the case then the links above should do the trick for you.