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: get fails to use ssh on non-standard port for private repos #36666

Closed
Tatsujinichi opened this issue Jan 21, 2020 · 3 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@Tatsujinichi
Copy link

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

go version go1.13.6 linux/amd64

Does this issue reproduce with the latest release?

yes

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

4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

What did you do?

private gitlab repo, accessible only through ssh, via non-standard port
go get will continue to try to use port 22

Because you can not specify a port anywhere besides the .gitconfig using url insteadOf
There is no nice way around this.
I tried using the port in GOPRIVATE envvar, but no good.

I expect that "go get" would allow me to specifying a port. Right now that is not allowed.

@toothrot toothrot changed the title go get fails to use ssh on private repos on non-standard port cmd/go: get fails to use ssh on private repos on non-standard port Jan 21, 2020
@toothrot toothrot changed the title cmd/go: get fails to use ssh on private repos on non-standard port cmd/go: get fails to use ssh on non-standard port for private repos Jan 21, 2020
@toothrot toothrot added this to the Backlog milestone Jan 21, 2020
@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 21, 2020
@toothrot
Copy link
Contributor

/cc @bcmills @jayconrod

@bcmills
Copy link
Contributor

bcmills commented Jan 21, 2020

What did you do?

In that section of the issue report, please describe the specific commands that you executed in enough detail that we can reproduce the problem you're having. A general description is usually not sufficient.

Because you can not specify a port anywhere besides the .gitconfig using url insteadOf

Note that you can specify a port in your global .gitconfig. Beyond that, if you want to customize the way that the go command resolves an import path to a repo location and protocol, you'll need to use an HTTPS server as described in https://tip.golang.org/cmd/go/#hdr-Remote_import_paths.

At this time, we are not likely to add further customization points beyond that protocol. If you believe that you have a compelling use-case, please add an experience report describing it — and also describing why the existing alternatives are not suitable.

@bcmills bcmills modified the milestones: Backlog, Unplanned Jan 21, 2020
@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 21, 2020
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants