{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/13453","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/13453/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/13453/comments","events_url":"https://api.github.com/repos/golang/go/issues/13453/events","html_url":"https://github.com/golang/go/issues/13453","id":119974019,"number":13453,"title":"cmd/go: ssh ControlPersist freezes `go get`","user":{"login":"cdelorme","id":791749,"avatar_url":"https://avatars.githubusercontent.com/u/791749?v=3","gravatar_id":"","url":"https://api.github.com/users/cdelorme","html_url":"https://github.com/cdelorme","followers_url":"https://api.github.com/users/cdelorme/followers","following_url":"https://api.github.com/users/cdelorme/following{/other_user}","gists_url":"https://api.github.com/users/cdelorme/gists{/gist_id}","starred_url":"https://api.github.com/users/cdelorme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdelorme/subscriptions","organizations_url":"https://api.github.com/users/cdelorme/orgs","repos_url":"https://api.github.com/users/cdelorme/repos","events_url":"https://api.github.com/users/cdelorme/events{/privacy}","received_events_url":"https://api.github.com/users/cdelorme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1335,"closed_issues":423,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2016-06-20T18:52:29Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":2,"created_at":"2015-12-02T15:59:53Z","updated_at":"2016-06-20T18:54:37Z","closed_at":null,"body":"- What version of Go are you using (go version)?\r\n\t- go1.5 (built using gvm & go1.4.2)\r\n- What operating system and processor architecture are you using?\r\n\t- osx 10.9.5, intel core i7, amd64\r\n- What did you do?\r\n\r\nI 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.\r\n\r\nI added lines to my  `~/.gitconfig` to redirect `git clone` to use ssh for github.com:\r\n\r\n\t[url \"git@github.com:\"]\r\n\t\tinsteadOf = https://github.com/\r\n\r\nPrior to this project I had been using a globally applied ssh `ControlPath` to persist and reuse ssh connections:\r\n\r\n\tHost *\r\n\t    ControlMaster auto\r\n\t    ControlPath ~/.ssh/%r@%h:%p\r\n\t    CompressionLevel 9\r\n\t    ControlPersist 2h\r\n\t    ServerAliveInterval 60\r\n\r\n_I verified that the `ControlPersist` setting is what leads to the unexpected behavior, but I don't understand why `go get` is effected._\r\n\r\n- What did you expect to see?\r\n\t- in a terminal I execute `go get` against any go repo\r\n\t- it downloads the source\r\n\t- my terminal is released when it finishes\r\n- What did you see instead?\r\n\t- I ran `go get`\r\n\t- the repository is cloned\r\n\t- my terminal remains busy\r\n- additional troubleshooting\r\n\r\nI 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.\r\n\r\nIf I run `git clone` with `ControlPersist` enabled, everything works as expected, including my terminal being relinquished after it finishes cloning.\r\n\r\nIf I establish an ssh connection first (eg. `ControlPath` exists for a given host), then run `go get` with `ControlPersist` enabled, it works as expected.  So once the master connection is established it works fine."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/227235088","html_url":"https://github.com/golang/go/issues/13453#issuecomment-227235088","issue_url":"https://api.github.com/repos/golang/go/issues/13453","id":227235088,"user":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T18:54:37Z","updated_at":"2016-06-20T18:54:37Z","body":"From #16104: we could consider setting `GIT_SSH_COMMAND='ssh -o ControlMaster=no'` before invoking `git`.\r\n\r\nThe explanation for the behavior is also in #16104: `go get` is waiting for standard error to be closed."}}
{"actor":{"display_login":"ianlancetaylor"}}