-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: ssh ControlPersist freezes go get
#13453
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
Comments
Verified the same behavior on linux (debian jessie), also core i7, amd64. |
go get
go get
Nice find. |
Why does |
I use I would much rather see a fix to how If the objective of |
CL https://golang.org/cl/31353 mentions this issue. |
I use it that way too. The most common use-case here is @github itself. The common workaround to fix this problem is to kill the master process controlling the socket. Unless I am seeing a completely different problem here. Since the workaround is so simple and can even be automated for builders, I would rather like to have a go get which is not disabling my carefully chosen non-default ssh options. |
If ssh goes to background (becomes a master) without closing stderr,
isn't that a classical daemonization bug?
|
I asked about this behavior on the openssh mailing list a couple of years ago but never got a reply: https://lists.mindrot.org/pipermail/openssh-unix-dev/2014-January/031975.html I eventually stopped using controlmaster because of it. There are problems with a lot of software besides |
Nice find! I was wondering why things were hanging. For what it's worth, it looks like a fix will be in OpenSSH 7.3. Good to see a fix go-side though, considering it will take a while before >=7.3 is the norm. Link to patch, was applied April 2016. |
I was trying to redirect
go get
to use the ssh address instead of the https address when cloning from a given address, as a proof-of-concept for use inside a company with a private repository host.I added lines to my
~/.gitconfig
to redirectgit clone
to use ssh for github.com:Prior to this project I had been using a globally applied ssh
ControlPath
to persist and reuse ssh connections:I verified that the
ControlPersist
setting is what leads to the unexpected behavior, but I don't understand whygo get
is effected.go get
against any go repogo get
I tried with many repositories, and verified that when I disable
ControlPersist
in my~/.ssh/config
my terminal is freed after the operation (as desired/expected), but then I no-longer have persisted ssh.If I run
git clone
withControlPersist
enabled, everything works as expected, including my terminal being relinquished after it finishes cloning.If I establish an ssh connection first (eg.
ControlPath
exists for a given host), then rungo get
withControlPersist
enabled, it works as expected. So once the master connection is established it works fine.The text was updated successfully, but these errors were encountered: