Had trouble deploying to Vapor Cloud

Hi

I had a bit of trouble deploying the TIL app in Chapter 5 and I was hoping if you (the authors) would include a few tips on how to set up Git first because it turns out that my problem stemmed from not having set up git properly on my Mac, specifically configuring the SSH stuff.
When I was doing ‘vapor cloud deploy’, I kept failing at 'Checkout branch ‘master’ and since I was not very experienced with GitHub, I had hard time figuring it out.
Could you please mention in your next edition setting up the git is a prerequisite? I am sure there are other people who may run into the same problem.

p.s. I own several Raywenderlich books and compared to the others, I find this book a bit hard to read and follow. Perhaps it is the way Vapor is made…

another p.s.
When I was trying to deploy the code to vapor cloud, I failed several times and tried to delete the created projects/applications/replicas and so on but the book does not mention how to remove them and start over. I figured it out by reading the document page on vapor.codes (and the fact that dashboard.vapor.code is not very user-friendly makes it more difficult) but I thought it would be nice if the next edition at least points the reader to the related on-line document.
Unlike iOS programming, server-side Swift/Vapor seems rather unintuitive and I have a feeling that people who come from the iOS background probably will need a bit more hand-holding while getting used to Vapor development methodology.

Hi @wayne0714,

The checkout master branch error looks like you haven’t pushed your code to GitHub on the master branch.

In terms of the unintuitive Dashboard, it’s something we are aware of, we have recently launched an Alpha of our next major version, where the dashboard have gotten a huge overhaul to make it much easier to use, with a lot less nesting, there is also a lot more documentation on how to use the dashboard.

Besides that we also plan on exposing a lot more features in the toolbox, like delete etc.

As I have 2FA enabled on my GitHub account I also ran into the same issue:

iMac:TILApp michael$ vapor cloud deploy
app: TIL
git: git@github.com:GitHubUsername/vapor-til.git
env: production
db: none
replicas: 1
replica size: free
branch: master
build: clean
Creating deployment [Done]
Connecting to build logs ...
Waiting in Queue [Done]
Checkout branch 'master' [Failed]
Successfully deployed.

To fix it you need to:

  1. Add a SSH key to your GitHub account.
  2. Whilst in the TILApp directory in Terminal run:
    git push -u origin master
2 Likes