Deployment error: invalid option "--token="

When I try to deploy to GitHub Pages using the following code:

  provider: pages
  skip_cleanup: true
  github_token: $TRAVIS_DEPLOY_TOKEN 
  keep_history: true
      - master

I get the following output:

$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
invalid option "--token="
failed to deploy

What’s going on?

Duplicate of

Where should the edge: true go? In my deploy section or my build matrix or where? I put edge: true in my deploy config, but now I get this output:

Authenticate deployment
Moving deploy key to ~/.dpl/deploy_key

no implicit conversion of nil into String (TypeError)
failed to deploy

Please link to a build. :


and this envvar is not set.

You should probably rather insert a secure: entry there instead of an envvar since this value is not used anywhere else.

So I should use secure: $TRAVIS_DEPLOY_TOKEN instead of github_token: $TRAVIS_DEPLOY_TOKEN? Or is there something else I should use?

Never mind. I just realized that the variable needs to be set on Travis, not Github.