{"action":"created","issue":{"url":"https://api.github.com/repos/lorisleiva/laravel-deployer/issues/60","repository_url":"https://api.github.com/repos/lorisleiva/laravel-deployer","labels_url":"https://api.github.com/repos/lorisleiva/laravel-deployer/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/lorisleiva/laravel-deployer/issues/60/comments","events_url":"https://api.github.com/repos/lorisleiva/laravel-deployer/issues/60/events","html_url":"https://github.com/lorisleiva/laravel-deployer/issues/60","id":372369554,"node_id":"MDU6SXNzdWUzNzIzNjk1NTQ=","number":60,"title":"Problem when doing git clone recursive with SSH","user":{"login":"satyakresna","id":11099186,"node_id":"MDQ6VXNlcjExMDk5MTg2","avatar_url":"https://avatars2.githubusercontent.com/u/11099186?v=4","gravatar_id":"","url":"https://api.github.com/users/satyakresna","html_url":"https://github.com/satyakresna","followers_url":"https://api.github.com/users/satyakresna/followers","following_url":"https://api.github.com/users/satyakresna/following{/other_user}","gists_url":"https://api.github.com/users/satyakresna/gists{/gist_id}","starred_url":"https://api.github.com/users/satyakresna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satyakresna/subscriptions","organizations_url":"https://api.github.com/users/satyakresna/orgs","repos_url":"https://api.github.com/users/satyakresna/repos","events_url":"https://api.github.com/users/satyakresna/events{/privacy}","received_events_url":"https://api.github.com/users/satyakresna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-22T00:03:58Z","updated_at":"2018-10-23T07:52:38Z","closed_at":null,"author_association":"NONE","body":"Hi Loris, I have a problem when running **upload strategy**. When execute task **deploy:update_code** it turns out like this:\r\n```\r\ngit@github.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\r\n\r\nPlease make sure you have the correct access rights\r\nand the repository exists.\r\nConnection to mywebsite.com closed.\r\ngit@github.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\r\n```\r\nLog detail:\r\n```\r\nThe command \"ssh -A -tt -i ~/.ssh/id_rsa myuser@mywebsite.com 'cd /var/www/mywebsite && (/usr/bin/git clone -b develop --recursive -q git@github.com:myuser/mywebsite.git /var/www/mywebsite/releases/6 2>&1)'\" failed.                                                                                                                                                                          \r\n                                                                                                                                                                                                          \r\n  Exit Code: 128(Invalid exit argument)                                                                                                                                                                   \r\n                                                                                                                                                                                                          \r\n  Working directory: /Users/myuser/code/myprojects                                                                                                                                                      \r\n                                                                                                                                                                                                          \r\n  Output:                                                                                                                                                                                                 \r\n  ================                                                                                                                                                                                        \r\n                                                                                                                                                                                                          \r\n                                                                                                                                                                                                          \r\n  Error Output:                                                                                                                                                                                           \r\n  ================   \r\n```\r\n\r\nI check your blog post [Zero-downtime Laravel deployment in 5 minutes](http://lorisleiva.com/learn-laravel-deployer-1/) that I must ensure that my server communicate with Github. I already do ```php artisan deploy -o git_tty=true```. But, after do this command, it turns out like above. I'm also setup SSH key on my server like you write in your blog post. But, I think there's something is missing in section **setup ssh key server** like attach the ssh key to my Github repo or my profile.\r\n\r\nSo for a moment, I must replace SSH with HTTPS and it runs well.\r\n**In my config/deploy.php**\r\n```php\r\n'options' => [\r\n        'application' => env('APP_NAME', 'MyWebsite'),\r\n        'repository' => 'https://github.com/myuser/mywebsite.git',\r\n        'php_fpm_service' => 'php7.2-fpm',\r\n        'git_tty' => true,\r\n    ],\r\n```\r\n\r\nBut, I'm curious how to solve this problem and I can use SSH. I hope you can tell us how to solve this problem. Thanks"},"comment":{"url":"https://api.github.com/repos/lorisleiva/laravel-deployer/issues/comments/432135871","html_url":"https://github.com/lorisleiva/laravel-deployer/issues/60#issuecomment-432135871","issue_url":"https://api.github.com/repos/lorisleiva/laravel-deployer/issues/60","id":432135871,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjEzNTg3MQ==","user":{"login":"lorisleiva","id":3642397,"node_id":"MDQ6VXNlcjM2NDIzOTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3642397?v=4","gravatar_id":"","url":"https://api.github.com/users/lorisleiva","html_url":"https://github.com/lorisleiva","followers_url":"https://api.github.com/users/lorisleiva/followers","following_url":"https://api.github.com/users/lorisleiva/following{/other_user}","gists_url":"https://api.github.com/users/lorisleiva/gists{/gist_id}","starred_url":"https://api.github.com/users/lorisleiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorisleiva/subscriptions","organizations_url":"https://api.github.com/users/lorisleiva/orgs","repos_url":"https://api.github.com/users/lorisleiva/repos","events_url":"https://api.github.com/users/lorisleiva/events{/privacy}","received_events_url":"https://api.github.com/users/lorisleiva/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T07:52:38Z","updated_at":"2018-10-23T07:52:38Z","author_association":"OWNER","body":"Hi Satya 👋 \r\n\r\nLaravel Deployer uses your local SSH key to connect to GitHub even on the server side. So as long as you can clone a repository via SSH on your computer, it should also work on Laravel Deployer.\r\n\r\nMake sure that your public key (typically located in `~/.ssh/id_rsa.pub`) has been added to your GitHub account. [Here is an official tutorial from GitHub](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/).\r\n\r\nI hope this help. Let me know how you get on with this."}}
{"actor":{"display_login":"lorisleiva"}}