1

I have a bare repo on my server that I'm attempting to push a local Ghost site to.

On the server, the Ghost grunt init is unable to successfully complete because there is no working tree:

$ grunt init

Running "update_submodules:default" (update_submodules) task
Warning: fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree. Use --force to continue.

I suspect that a way around this would be to do all grunt work locally, and avoid gitignoreing the results of the build. If so, can anyone offer some insight on what to remove from the Ghost gitignore?

My preference would be to run grunt on the server after pushing. Is there any way to make that possible for a bare repo?

Ash Ryan Arnwine
  • 1,471
  • 1
  • 11
  • 27

1 Answers1

2

It turns out I was thinking of this sort of backwards. I was trying to push a local repo to a bare git repo on the server, but...

The preferred method is to install a Ghost build directly on the server.

Example:

$ sudo wget https://ghost.org/zip/ghost-latest.zip

From there you would unzip and perform the standard setup commands.


Digital Ocean has a great guide that shows you how to:

  1. Install a Ghost build directly to Ubuntu
  2. Edit the Ghost config file
  3. Proxy with Nginx
  4. Fire up the blog server permanently with modules like forever and pm2

I wrote a post on the Ghost blog I was able to set up as a result, providing a few more details.

Ash Ryan Arnwine
  • 1,471
  • 1
  • 11
  • 27