jekyllt / jasper

Full-featured Jekyll port of Ghost's default theme Casper 👻
https://jekyller.github.io/jasper/
MIT License
581 stars 348 forks source link

Travis build fails with The command "bundle exec rake site:deploy --quiet" exited with 1 #32

Closed theramiyer closed 7 years ago

theramiyer commented 7 years ago

Hey @biomadeira! Loved the theme. Just loved it. Been customising it for a day now. However, I'm unable to use Travis to build the site for me. Everything goes well until the bundle exec rake site:deploy --quiet thing. The command fails and the build fails. The error message is:

remote: Invalid username or password.
fatal: Authentication failed for 'https://theramiyer:_token_here_@github.com/theramiyer/noob.ramiyer.me.git/'
rake aborted!
Command failed with status (128): [if [ -n '$(git status)' ]; then
          ...]
.
.
.
The command "bundle exec rake site:deploy --quiet" exited with 1.

I'm new to all this, and I'm sorry to bother you about this perhaps trivial thing. But I tried searching Google without luck. Could you help, please?

I know I'm making a mistake so small, I would wanna bury my face in the sand once you point it out, but still. Don't know what I'm missing.

Am I going wrong somewhere here?

username: theramiyer
repo: noob.ramiyer.me
branch: master
relative_source: ../noob.ramiyer.me/
destination: ../jasper-pages/
production_url:  https://theramiyer.github.io/noob.ramiyer.me/
source_url: https://github.com/theramiyer/noob.ramiyer.me/

The fork is https://github.com/theramiyer/noob.ramiyer.me.

theramiyer commented 7 years ago

Is it possible that https://theramiyer:RandomChracterToken@github.com/theramiyer/noob.ramiyer.me.git/ should be using ssh instead of https? Because the address seems so.

biomadeira commented 7 years ago

Hi Ram,

It seems that you are running some authentication problems. Make sure you generated your own tokens to use in travis. This gives travis access to your github account. See some more on that in the .travis.yml file or in the description below.

For all the process to work you need to generate a secure token using the travis gem:

1- You need get a ‘Personal access token’ (with all repo and user options ticked) to use in travis. You get this from your settings page in github, under the ‘Developer settings’. (GH_TOKEN from https://github.com/settings/tokens)

2 - then run

gem install travis

3 - this install travis locally in your machine, which you need for the next step; and then run

travis encrypt 'GIT_NAME="YOUR_GITHUB_USERNAME" GIT_EMAIL="YOUR_GITHUB_EMAIL" GH_TOKEN=YOUR_TOKEN’

4 - this generates a big key that you paste into the 'env: global: secure:' field

Let me know if it works!

Fábio

theramiyer commented 7 years ago

Hi Fábio,

Yes, I seemed to have missed that part. I misunderstood "get" as "look for", instead of "generate". Sorry about that. The build is running fine, now. Thank you and the Ghost team for the beautiful theme. Became a fan of it. :+1:

Have a great day!

Ram