{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/4226","repository_url":"https://api.github.com/repos/gogits/gogs","labels_url":"https://api.github.com/repos/gogits/gogs/issues/4226/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/4226/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/4226/events","html_url":"https://github.com/gogits/gogs/issues/4226","id":211549411,"number":4226,"title":"\"go get\" breaks with git/http between 0.9.x and 0.10.x (URL changes?)","user":{"login":"IaBurton","id":4121211,"avatar_url":"https://avatars0.githubusercontent.com/u/4121211?v=3","gravatar_id":"","url":"https://api.github.com/users/IaBurton","html_url":"https://github.com/IaBurton","followers_url":"https://api.github.com/users/IaBurton/followers","following_url":"https://api.github.com/users/IaBurton/following{/other_user}","gists_url":"https://api.github.com/users/IaBurton/gists{/gist_id}","starred_url":"https://api.github.com/users/IaBurton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IaBurton/subscriptions","organizations_url":"https://api.github.com/users/IaBurton/orgs","repos_url":"https://api.github.com/users/IaBurton/repos","events_url":"https://api.github.com/users/IaBurton/events{/privacy}","received_events_url":"https://api.github.com/users/IaBurton/received_events","type":"User","site_admin":false},"labels":[{"id":80068182,"url":"https://api.github.com/repos/gogits/gogs/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":162359629,"url":"https://api.github.com/repos/gogits/gogs/labels/status/needs%20feedback","name":"status/needs feedback","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/gogits/gogs/milestones/17","html_url":"https://github.com/gogits/gogs/milestone/17","labels_url":"https://api.github.com/repos/gogits/gogs/milestones/17/labels","id":1675342,"number":17,"title":"0.11","description":"","creator":{"login":"Unknwon","id":2946214,"avatar_url":"https://avatars0.githubusercontent.com/u/2946214?v=3","gravatar_id":"","url":"https://api.github.com/users/Unknwon","html_url":"https://github.com/Unknwon","followers_url":"https://api.github.com/users/Unknwon/followers","following_url":"https://api.github.com/users/Unknwon/following{/other_user}","gists_url":"https://api.github.com/users/Unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/Unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unknwon/subscriptions","organizations_url":"https://api.github.com/users/Unknwon/orgs","repos_url":"https://api.github.com/users/Unknwon/repos","events_url":"https://api.github.com/users/Unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/Unknwon/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":31,"state":"open","created_at":"2016-03-31T03:23:03Z","updated_at":"2017-03-06T23:35:21Z","due_on":"2017-03-21T07:00:00Z","closed_at":null},"comments":3,"created_at":"2017-03-02T23:23:03Z","updated_at":"2017-03-06T23:42:38Z","closed_at":null,"body":"- Gogs version (or commit ref): 0.9.97 - 0.10.1\r\n- Git version: 1.8.3.1\r\n- Operating system: Centos 6\r\n- Database (use `[x]`):\r\n  - [ ] PostgreSQL\r\n  - [x] MySQL\r\n  - [ ] SQLite\r\n- Can you reproduce the bug at https://try.gogs.io:\r\n  - [ ] Yes (provide example URL)\r\n  - [ ] No\r\n  - [x] Not relevant\r\n- Log gist (usually found in `log/gogs.log`):\r\n\r\nDrone test build with gogs 0.9.141\r\n[Macaron] 2017-03-02 14:52:56: Started GET /api/v1/repos/Ian/test/raw/v0.6/drone.yml for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:56: Completed /api/v1/repos/Ian/test/raw/v0.6/drone.yml 200 OK in 59.789438ms\r\n[Macaron] 2017-03-02 14:52:56: Started GET /api/v1/repos/Ian/test/raw/v0.6/drone.yml.sig for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:56: Completed /api/v1/repos/Ian/test/raw/v0.6/drone.yml.sig 404 Not Found in 68.977499ms\r\n[Macaron] 2017-03-02 14:52:58: Started GET /Ian/test.git/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:58: Completed /Ian/test.git/info/refs?service=git-upload-pack 401 Unauthorized in 5.056218ms\r\n[Macaron] 2017-03-02 14:52:58: Started GET /Ian/test.git/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:59: Completed /Ian/test.git/info/refs?service=git-upload-pack 200 OK in 207.832553ms\r\n[Macaron] 2017-03-02 14:52:59: Started POST /Ian/test.git/git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:59: Completed /Ian/test.git/git-upload-pack 200 OK in 216.990109ms\r\n[Macaron] 2017-03-02 14:52:59: Started GET /devel/lflag/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:59: Completed /devel/lflag/info/refs?service=git-upload-pack 401 Unauthorized in 4.995317ms\r\n[Macaron] 2017-03-02 14:52:59: Started GET /devel/lflag/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:59: Completed /devel/lflag/info/refs?service=git-upload-pack 200 OK in 173.165033ms\r\n[Macaron] 2017-03-02 14:52:59: Started GET /devel/lflag/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:52:59: Completed /devel/lflag/info/refs?service=git-upload-pack 401 Unauthorized in 3.947597ms\r\n[Macaron] 2017-03-02 14:52:59: Started GET /devel/lflag/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:53:00: Completed /devel/lflag/info/refs?service=git-upload-pack 200 OK in 197.229813ms\r\n[Macaron] 2017-03-02 14:53:00: Started POST /devel/lflag/git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 14:53:00: Completed /devel/lflag/git-upload-pack 200 OK in 161.1855ms\r\n\r\nSame test build with gogs 0.10.1\r\n[Macaron] 2017-03-02 10:22:52: Started GET /api/v1/repos/Ian/test/raw/v0.6/drone.yml for 192.168.2.134\r\n[Macaron] 2017-03-02 10:22:52: Completed GET /api/v1/repos/Ian/test/raw/v0.6/drone.yml 200 OK in 82.855318ms\r\n[Macaron] 2017-03-02 10:22:52: Started GET /api/v1/repos/Ian/test/raw/v0.6/drone.yml.sig for 192.168.2.134\r\n[Macaron] 2017-03-02 10:22:52: Completed GET /api/v1/repos/Ian/test/raw/v0.6/drone.yml.sig 404 Not Found in 71.046125ms\r\n[Macaron] 2017-03-02 10:22:54: Started GET /Ian/test.git/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 10:22:54: Completed GET /Ian/test.git/info/refs?service=git-upload-pack 401 Unauthorized in 5.017977ms\r\n[Macaron] 2017-03-02 10:22:54: Started GET /Ian/test.git/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 10:22:54: Completed GET /Ian/test.git/info/refs?service=git-upload-pack 200 OK in 193.957579ms\r\n[Macaron] 2017-03-02 10:22:54: Started POST /Ian/test.git/git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 10:22:54: Completed POST /Ian/test.git/git-upload-pack 200 OK in 158.866432ms\r\n[Macaron] 2017-03-02 10:22:55: Started GET /devel/lflag/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 10:22:55: Completed GET /devel/lflag/info/refs?service=git-upload-pack 404 Not Found in 7.975791ms\r\n[Macaron] 2017-03-02 10:23:12: Started GET /devel/lflag/info/refs?service=git-upload-pack for 192.168.2.134\r\n[Macaron] 2017-03-02 10:23:12: Completed GET /devel/lflag/info/refs?service=git-upload-pack 404 Not Found in 5.075256ms\r\n\r\n## Description\r\nHello,\r\n\r\nI recently upgraded the gogs version I use at work from 0.9.97 to 0.10.1 and the upgrade appeared to go smoothly albeit for two things (the second one I think needs to be its own issue I'll make after this).\r\n\r\nOur gogs setup is configured with webhooks that trigger drone (0.5) builds. After upgrading gogs versions it seems `go get` from inside the docker containers has stopped working and I'm having a hard time figuring out why. Reverting gogs to 0.9.97 and up to 0.9.141 fixes the problem.\r\n\r\nDrone has a clone step that clones the repo that triggered the build before the rest of the build takes place, and currently this step works on 0.10.1 (so git is cloning/authing correctly with gogs) however the next step in the build is to run `go get` on the repo to pull the other Go deps (most of which are other gogs repos) and it is here where it fails. We use HTTP and SSH (not HTTPS) with gogs but the drone server simply pulls the http url (uses -insecure flag with go get) and uses a .netrc file with a users credentials in order to clone the repo (gogs is set to have registration closed which means you cannot clone without being a user)\r\n\r\nIn the log snippets above the 401 Unauthorized I believe come from the fact that git tries pulling the url first without the netrc and when it fails adds the auth info from netrc and tries again (why afterwards it succeeds with 200). I think the key URL is this one `/devel/lflag/info/refs?service=git-upload-pack` (where lflag is a Go dep of the test repo I setup). For versions 0.9.141 and below that URL exists and succeeds, but for 0.10.1 it returns 404.\r\n\r\nIdk 100% if thats the issue, and I did look for similar issues here and through the release notes of the versions between 0.9.97 and 0.10.1 and didn't see why this would change. Below is a small snippet of the output from the build on drone \r\n\r\n`go get -v -d -insecure\r\ncd .; git ls-remote git://192.168.2.14:3000/devel/lflag\r\nfatal: repository 'http://192.168.2.14:3000/devel/lflag/' not found`\r\nThe http url above does exist and works for older versions of gogs. I can reproduce this outside of drone by simply running the commands `go get` is. Let me know if there is more information needed, thank you.\r\n...\r\n"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/284571816","html_url":"https://github.com/gogits/gogs/issues/4226#issuecomment-284571816","issue_url":"https://api.github.com/repos/gogits/gogs/issues/4226","id":284571816,"user":{"login":"hochhaus","id":5508784,"avatar_url":"https://avatars0.githubusercontent.com/u/5508784?v=3","gravatar_id":"","url":"https://api.github.com/users/hochhaus","html_url":"https://github.com/hochhaus","followers_url":"https://api.github.com/users/hochhaus/followers","following_url":"https://api.github.com/users/hochhaus/following{/other_user}","gists_url":"https://api.github.com/users/hochhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/hochhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hochhaus/subscriptions","organizations_url":"https://api.github.com/users/hochhaus/orgs","repos_url":"https://api.github.com/users/hochhaus/repos","events_url":"https://api.github.com/users/hochhaus/events{/privacy}","received_events_url":"https://api.github.com/users/hochhaus/received_events","type":"User","site_admin":false},"created_at":"2017-03-06T23:42:38Z","updated_at":"2017-03-06T23:42:38Z","body":"Thanks. I have now fixed my config error and can confirm you fix works.\r\n\r\nLong story short, my repo is setup as a local mirror and I incorrectly set the server.DOMAIN in app.ini."}}
{"actor":{"display_login":"hochhaus"}}