{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/1306","repository_url":"https://api.github.com/repos/gogits/gogs","labels_url":"https://api.github.com/repos/gogits/gogs/issues/1306/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/1306/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/1306/events","html_url":"https://github.com/gogits/gogs/issues/1306","id":84102135,"number":1306,"title":"Cloning with SSH does not work (says repository doesn't exist)","user":{"login":"Overv","id":285063,"avatar_url":"https://avatars.githubusercontent.com/u/285063?v=3","gravatar_id":"","url":"https://api.github.com/users/Overv","html_url":"https://github.com/Overv","followers_url":"https://api.github.com/users/Overv/followers","following_url":"https://api.github.com/users/Overv/following{/other_user}","gists_url":"https://api.github.com/users/Overv/gists{/gist_id}","starred_url":"https://api.github.com/users/Overv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Overv/subscriptions","organizations_url":"https://api.github.com/users/Overv/orgs","repos_url":"https://api.github.com/users/Overv/repos","events_url":"https://api.github.com/users/Overv/events{/privacy}","received_events_url":"https://api.github.com/users/Overv/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":156137697,"url":"https://api.github.com/repos/gogits/gogs/labels/status/needs%20reproduce","name":"status/needs reproduce","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":45,"created_at":"2015-06-02T16:47:54Z","updated_at":"2016-11-23T21:01:41Z","closed_at":"2015-09-02T23:45:21Z","body":"I've installed the latest version of Gogs on Ubuntu 14.04 using [this guide](https://www.digitalocean.com/community/tutorials/how-to-set-up-gogs-on-ubuntu-14-04). Checking out with HTTP works fine:\n\n```\ngit@git-server:~$ git clone http://xxx.xxx.xxx.xxx/overv/my-test-repo.git\nCloning into 'my-test-repo'...\nremote: Counting objects: 3, done.\nremote: Total 3 (delta 0), reused 0 (delta 0)\nUnpacking objects: 100% (3/3), done.\nChecking connectivity... done.\n```\n\nBut when I try to clone with SSH, it will say the repository doesn't exist:\n\n```\ngit@git-server:~$ git clone git@xxx.xxx.xxx.xxx:overv/my-test-repo.git\nCloning into 'my-test-repo'...\nThe authenticity of host 'xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)' can't be established.\nECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.\nAre you sure you want to continue connecting (yes/no)? yes\ngit@xxx.xxx.xxx.xxx's password:\nfatal: 'overv/my-test-repo.git' does not appear to be a git repository\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n```\n\nAs you can see, I'm using the URL as given to me by Gogs:\n\n![Link](http://i.imgur.com/AAmpETM.png)\n\nIt only works if I use the full path:\n\n```\ngit clone git@xxx.xxx.xxx.xxx:~/gogs-repositories/overv/my-test-repo.git\n```\n\nHow do I fix this?\n"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/262629003","html_url":"https://github.com/gogits/gogs/issues/1306#issuecomment-262629003","issue_url":"https://api.github.com/repos/gogits/gogs/issues/1306","id":262629003,"user":{"login":"vboufleur","id":16310611,"avatar_url":"https://avatars.githubusercontent.com/u/16310611?v=3","gravatar_id":"","url":"https://api.github.com/users/vboufleur","html_url":"https://github.com/vboufleur","followers_url":"https://api.github.com/users/vboufleur/followers","following_url":"https://api.github.com/users/vboufleur/following{/other_user}","gists_url":"https://api.github.com/users/vboufleur/gists{/gist_id}","starred_url":"https://api.github.com/users/vboufleur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vboufleur/subscriptions","organizations_url":"https://api.github.com/users/vboufleur/orgs","repos_url":"https://api.github.com/users/vboufleur/repos","events_url":"https://api.github.com/users/vboufleur/events{/privacy}","received_events_url":"https://api.github.com/users/vboufleur/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T21:01:41Z","updated_at":"2016-11-23T21:01:41Z","body":"Just leaving this comment in case someone stumbles upon here. This issue is one of the first results on a \"gogs ssh clone permission denied public key\" google search and I had a tough time finding the solution to this particular problem.\r\n\r\nMy gogs is hosted on CentOS 7. I was having this error while cloning a gogs repo with ssh:\r\n\r\n    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n    fatal: Could not read from remote repository.\r\n    Please make sure you have the correct access rights\r\n    and the repository exists.\r\n\r\nI fixed it by setting `UsePAM` to `yes` on `/etc/ssh/sshd_config`. Set this option, restart the sshd service and you're good to go."}}
{"actor":{"display_login":"vboufleur"}}