{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/3395","repository_url":"https://api.github.com/repos/gogits/gogs","labels_url":"https://api.github.com/repos/gogits/gogs/issues/3395/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/3395/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/3395/events","html_url":"https://github.com/gogits/gogs/issues/3395","id":169866027,"number":3395,"title":"Cannot push, using ssh","user":{"login":"dncohen","id":256216,"avatar_url":"https://avatars.githubusercontent.com/u/256216?v=3","gravatar_id":"","url":"https://api.github.com/users/dncohen","html_url":"https://github.com/dncohen","followers_url":"https://api.github.com/users/dncohen/followers","following_url":"https://api.github.com/users/dncohen/following{/other_user}","gists_url":"https://api.github.com/users/dncohen/gists{/gist_id}","starred_url":"https://api.github.com/users/dncohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dncohen/subscriptions","organizations_url":"https://api.github.com/users/dncohen/orgs","repos_url":"https://api.github.com/users/dncohen/repos","events_url":"https://api.github.com/users/dncohen/events{/privacy}","received_events_url":"https://api.github.com/users/dncohen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-08T08:11:10Z","updated_at":"2016-08-08T21:19:41Z","closed_at":"2016-08-08T19:40:36Z","body":"\r\n- Gogs version (or commit ref): \r\ncommit 08c976f8117b92b25ea197e7dc0372b49d9ee412\r\nAuthor: Unknwon <u@gogs.io>\r\nDate:   Sat Aug 6 11:20:10 2016 -0700\r\n\r\n    Only do go vet on this codebase\r\n\r\n\r\n- Git version: \r\n$ git --version\r\ngit version 2.7.0\r\n\r\n\r\n- Operating system: \r\nOpenBSD 5.9\r\n\r\n- Database (use `[x]`):\r\n  - [X ] PostgreSQL\r\n  - [ ] MySQL\r\n  - [ ] SQLite\r\n(Wanted to try sqlite, but couldn't make it work, not what this issue is about)\r\n\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:\r\n\r\n## Description\r\n\r\nI'm aware that other issues in this queue have basically the same title.  I'm seeing different details, so I thought it wise to submit a new issue.  Apologies in advance if I'm wrong about that.\r\n\r\nHere's what it looks like, to the user attempting to push:\r\n\r\n```\r\ndave@tripper:test $ git push origin \r\nCounting objects: 3, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (2/2), done.\r\nWriting objects: 100% (3/3), 268 bytes | 0 bytes/s, done.\r\nTotal 3 (delta 0), reused 0 (delta 0)\r\nremote: 2016/08/08 00:55:16 [W] Custom config 'custom/conf/app.ini' not found, ignore this if you're running first time\r\nremote: error: hook declined to update refs/heads/master\r\nTo ssh://gogs@gogs.electricgroups.com:3022/dave/test.git\r\n ! [remote rejected] master -> master (hook declined)\r\nerror: failed to push some refs to 'ssh://gogs@gogs.electricgroups.com:3022/dave/test.git'\r\n```\r\n\r\n(There is a complaint in there, \"'custom/conf/app.ini' not found\".  It does exist and as far as I can tell, it's found at server start.)\r\n\r\nHere's what shows up on the server at the same time:\r\n\r\n```\r\n2016/08/08 00:55:03 [T] SSH: Handshaking for 24.5.151.253:20977\r\n2016/08/08 00:55:04 [...s/modules/ssh/ssh.go:156 func1()] [E] SearchPublicKeyByContent: public key does not exist [id: 0]\r\n2016/08/08 00:55:04 [T] SSH: Connection from 24.5.151.253:20977 (SSH-2.0-OpenSSH_7.2)\r\n2016/08/08 00:55:04 [T] SSH: Payload: git-receive-pack '/dave/test.git'\r\n2016/08/08 00:55:04 [T] SSH: Arguments: [serv key-6 --config=/home/gogs/custom/conf/app.ini]\r\n```\r\n\r\nI uploaded my SSH public key via the web interface.  I'm able to clone using SSH, but unable to push.\r\n\r\nI've seen other threads mention the authorized_keys file.  I'm not seeing anything added to that file.  I'm relying on gogs built-in SSH.  So I'm hoping the authorized_keys file is not needed or touched.  Is that the case?  Potentially relevant items from app.ini:\r\n\r\n```\r\n; Disable SSH feature when not available                                                       \r\nDISABLE_SSH = false\r\n; Whether use builtin SSH server or not.                                                       \r\nSTART_SSH_SERVER = true\r\n; Domain name to be exposed in clone URL                                                       \r\nSSH_DOMAIN = %(DOMAIN)s\r\n; Port number to be exposed in clone URL                                                       \r\nSSH_PORT = 3022\r\n; Port number builtin SSH server listens on                                                    \r\nSSH_LISTEN_PORT = %(SSH_PORT)s\r\n; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.       \r\nSSH_ROOT_PATH = /home/gogs/.ssh\r\n; Directory to create temporary files when test publick key using ssh-keygen,                  \r\n; default is system temporary directory.                                                       \r\nSSH_KEY_TEST_PATH = /home/gogs/tmp\r\n; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.        \r\nSSH_KEYGEN_PATH = ssh-keygen\r\n; Indicate whether to check minimum key size with corresponding type                           \r\nMINIMUM_KEY_SIZE_CHECK = false\r\n```\r\n\r\nI've tried different values for SSH_ROOT_PATH.  I.e., /home/gogs/ssh (instead of .ssh).  That directory was not created.  There is a /home/gogs/data/ssh, it has only gogs' key  I don't see the uploaded key anywhere... I'm assuming it is only in the database.\r\n\r\nPlease let me know if there's any other info I can provide.  Would love to start using gogs for real.  Thanks for this amazing open source project!\r\n"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/238381055","html_url":"https://github.com/gogits/gogs/issues/3395#issuecomment-238381055","issue_url":"https://api.github.com/repos/gogits/gogs/issues/3395","id":238381055,"user":{"login":"dncohen","id":256216,"avatar_url":"https://avatars.githubusercontent.com/u/256216?v=3","gravatar_id":"","url":"https://api.github.com/users/dncohen","html_url":"https://github.com/dncohen","followers_url":"https://api.github.com/users/dncohen/followers","following_url":"https://api.github.com/users/dncohen/following{/other_user}","gists_url":"https://api.github.com/users/dncohen/gists{/gist_id}","starred_url":"https://api.github.com/users/dncohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dncohen/subscriptions","organizations_url":"https://api.github.com/users/dncohen/orgs","repos_url":"https://api.github.com/users/dncohen/repos","events_url":"https://api.github.com/users/dncohen/events{/privacy}","received_events_url":"https://api.github.com/users/dncohen/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T21:19:41Z","updated_at":"2016-08-08T21:19:41Z","body":"I may have been thrown off by the instructions:\r\n\r\n```\r\nYou need to set key security -> INSTALL_LOCK to be true in file custom/conf/app.ini in order to run from source.\r\n```\r\n\r\n(from https://gogs.io/docs/installation/configuration_and_run)\r\nOnce I did that, there was no more /install !\r\n\r\nI can't access my server at the moment.  I'll try it later today.  Thanks."}}
{"actor":{"display_login":"dncohen"}}