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

cmd/go: get fails to use ssh on non-standard port for private repos #36666

Tatsujinichi opened this issue Jan 21, 2020 · 3 comments

Comments

@Tatsujinichi
Copy link

@Tatsujinichi Tatsujinichi commented Jan 21, 2020

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

This comment has been minimized.

Copy link
Contributor

@toothrot toothrot commented Jan 21, 2020

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills 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
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Feb 21, 2020

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.)

@gopherbot gopherbot closed this Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.