{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6362","repository_url":"https://api.github.com/repos/travis-ci/travis-ci","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6362/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6362/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6362/events","html_url":"https://github.com/travis-ci/travis-ci/issues/6362","id":167759257,"number":6362,"title":"Using secure api_key when configuring Heroku deployment fails.","user":{"login":"aconfee","id":3591960,"avatar_url":"https://avatars1.githubusercontent.com/u/3591960?v=4","gravatar_id":"","url":"https://api.github.com/users/aconfee","html_url":"https://github.com/aconfee","followers_url":"https://api.github.com/users/aconfee/followers","following_url":"https://api.github.com/users/aconfee/following{/other_user}","gists_url":"https://api.github.com/users/aconfee/gists{/gist_id}","starred_url":"https://api.github.com/users/aconfee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aconfee/subscriptions","organizations_url":"https://api.github.com/users/aconfee/orgs","repos_url":"https://api.github.com/users/aconfee/repos","events_url":"https://api.github.com/users/aconfee/events{/privacy}","received_events_url":"https://api.github.com/users/aconfee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-27T03:03:38Z","updated_at":"2018-03-23T10:05:46Z","closed_at":"2016-07-27T23:51:35Z","author_association":"NONE","body":"Hello!\n\nI've just been configuring this app: https://github.com/aconfee/MEANTemplateV2 to Travis CI. \n\nThe Problem:\nDeploying to Heroku fails with the error: \n  Fetching: dpl-1.8.17.gem (100%)\n  Successfully installed dpl-1.8.17\n  invalid option \"--api_key=\"\n  failed to deploy\n\nThis only occurs when I try to use a secure api_key. Using my exact api_key provided by: heroku auth:token works fine. \n\nWhat I've tried:\nTo create my secure API key, I installed the Travic CI CLI according to your documentation: gem install travis -v 1.8.2 --no-rdoc --no-ri. Once this successfully installed, I encrypted and added my api_key using: travis encrypt $(heroku auth:token) --add deploy.api_key according to your documentation.\n\nI did remember to use 'sudo' (dummy check). I also tried manually copy/pasting the api key as well as adding quotes. At this point I can't figure out what I could possibly be doing wrong after following the documentation explicitly. \n\nAny help is appreciated, thanks!\n"},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/375602517","html_url":"https://github.com/travis-ci/travis-ci/issues/6362#issuecomment-375602517","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/6362","id":375602517,"user":{"login":"joozybrain","id":36840964,"avatar_url":"https://avatars1.githubusercontent.com/u/36840964?v=4","gravatar_id":"","url":"https://api.github.com/users/joozybrain","html_url":"https://github.com/joozybrain","followers_url":"https://api.github.com/users/joozybrain/followers","following_url":"https://api.github.com/users/joozybrain/following{/other_user}","gists_url":"https://api.github.com/users/joozybrain/gists{/gist_id}","starred_url":"https://api.github.com/users/joozybrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joozybrain/subscriptions","organizations_url":"https://api.github.com/users/joozybrain/orgs","repos_url":"https://api.github.com/users/joozybrain/repos","events_url":"https://api.github.com/users/joozybrain/events{/privacy}","received_events_url":"https://api.github.com/users/joozybrain/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T10:05:46Z","updated_at":"2018-03-23T10:05:46Z","author_association":"NONE","body":"Hi there,\r\n\r\nI'm facing the same problem as the original poster. Running `travis encrypt $(heroku auth:token) --add deploy.api_key` leads to a failure on TravisCI with the following message. \r\n```\r\n2.55s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl\r\nFetching: dpl-1.9.5.gem (100%)\r\nSuccessfully installed dpl-1.9.5\r\n1 gem installed\r\n ▸    not logged in\r\ninvalid option \"--api_key=\"\r\nfailed to deploy\r\n```\r\n\r\nHowever, I'm able to get it to work by doing the following steps manually:\r\n1) `heroku auth:token`\r\n2) `travis encrypt <output of heroku auth:token>`\r\n3) Manually pasting the output in `.travis.yml`\r\n\r\nCould you share why it fails when I run `travis encrypt $(heroku auth:token)` with the `--add deploy.api_key` option?"}}
{"actor":{"display_login":"joozybrain"}}