{"action":"created","issue":{"url":"https://api.github.com/repos/go-gitea/gitea/issues/3741","repository_url":"https://api.github.com/repos/go-gitea/gitea","labels_url":"https://api.github.com/repos/go-gitea/gitea/issues/3741/labels{/name}","comments_url":"https://api.github.com/repos/go-gitea/gitea/issues/3741/comments","events_url":"https://api.github.com/repos/go-gitea/gitea/issues/3741/events","html_url":"https://github.com/go-gitea/gitea/issues/3741","id":309826598,"number":3741,"title":"Unix socket: cannot pull/push over SSH","user":{"login":"sloonz","id":142145,"avatar_url":"https://avatars2.githubusercontent.com/u/142145?v=4","gravatar_id":"","url":"https://api.github.com/users/sloonz","html_url":"https://github.com/sloonz","followers_url":"https://api.github.com/users/sloonz/followers","following_url":"https://api.github.com/users/sloonz/following{/other_user}","gists_url":"https://api.github.com/users/sloonz/gists{/gist_id}","starred_url":"https://api.github.com/users/sloonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloonz/subscriptions","organizations_url":"https://api.github.com/users/sloonz/orgs","repos_url":"https://api.github.com/users/sloonz/repos","events_url":"https://api.github.com/users/sloonz/events{/privacy}","received_events_url":"https://api.github.com/users/sloonz/received_events","type":"User","site_admin":false},"labels":[{"id":472744943,"url":"https://api.github.com/repos/go-gitea/gitea/labels/kind/question","name":"kind/question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-29T16:44:51Z","updated_at":"2018-03-30T14:33:38Z","closed_at":null,"author_association":"NONE","body":"- Gitea version (or commit ref): 1.4.0\r\n- Git version: 2.16.3\r\n- Go version: 1.10\r\n- Operating system: ArchLinux\r\n- Database (use `[x]`):\r\n  - [ ] PostgreSQL\r\n  - [x] MySQL\r\n  - [ ] MSSQL\r\n  - [ ] SQLite\r\n- Can you reproduce the bug at https://try.gitea.io:\r\n  - [ ] Yes (provide example URL)\r\n  - [ ] No\r\n  - [x] Not relevant\r\n\r\n## Description\r\n\r\nWith the following configuration (actual domain redacted by example.com) in the `[server]` section:\r\n\r\n```\r\nPROTOCOL                   = unix\r\nHTTP_ADDR                  = /run/nginx/gitea.sock\r\nDOMAIN                     = git.example.com\r\nROOT_URL                   = https://git.example.com/\r\nLOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/\r\n```\r\n\r\nTrying to perform a git pull/push via SSH results in an error : \r\n\r\n```\r\nUpdatePublicKey: Post unix:///run/nginx/gitea.sockapi/internal/ssh/1/update: unsupported protocol scheme \"unix\"\r\n```\r\n\r\nLooks like a regression over https://github.com/go-gitea/gitea/issues/2232, which has been fixed months ago. Adding some good old `Printf` traces in the code, I can see that `req.SetTransport` is called in `newInternalRequest`, but the `Dial` function that is set up there is never called ; the error is encountered before then. Changing `LOCAL_ROOT_URL` to `http://%(DOMAIN)s/` fixes the issue : both the `req.SetTransport` and `Dial` functions are called, and the request is performed on the unix socket (no log in the reverse proxy that’s listening on https://git.example.com/, and adding `deny all` on the reverse proxy do not prevent SSH pull/push), but that does not looks like to be the intended behavior."},"comment":{"url":"https://api.github.com/repos/go-gitea/gitea/issues/comments/377536930","html_url":"https://github.com/go-gitea/gitea/issues/3741#issuecomment-377536930","issue_url":"https://api.github.com/repos/go-gitea/gitea/issues/3741","id":377536930,"user":{"login":"lafriks","id":165205,"avatar_url":"https://avatars2.githubusercontent.com/u/165205?v=4","gravatar_id":"","url":"https://api.github.com/users/lafriks","html_url":"https://github.com/lafriks","followers_url":"https://api.github.com/users/lafriks/followers","following_url":"https://api.github.com/users/lafriks/following{/other_user}","gists_url":"https://api.github.com/users/lafriks/gists{/gist_id}","starred_url":"https://api.github.com/users/lafriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lafriks/subscriptions","organizations_url":"https://api.github.com/users/lafriks/orgs","repos_url":"https://api.github.com/users/lafriks/repos","events_url":"https://api.github.com/users/lafriks/events{/privacy}","received_events_url":"https://api.github.com/users/lafriks/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T14:33:38Z","updated_at":"2018-03-30T14:33:38Z","author_association":"OWNER","body":"Yes this description if using http protocol for gitea listener, description needs to be updated if using other protocols"}}
{"actor":{"display_login":"lafriks"}}