Sometimes a connection between Leanpub and a GitHub or Bitbucket repo can become compromised on the author's end.

In order to fix this, the best thing to do is just to switch to another writing mode in Leanpub, and then switch back to your original writing mode (i.e. GitHub or Bitbucket).

If you are working in GitHub or Bitbucket and you encounter this issue, we recommend you follow these steps:

1. Just to be really safe, we always like to say that authors should make sure to back up their work somewhere, if they haven't done so already. 

2. Go to the Writing Mode page for your book here:

https://leanpub.com/YOUR_BOOK/writing_mode

...making sure to replace YOUR_BOOK with your book's unique web address.

3. Select the "In my browser with a Markua plain text editor" writing mode.

4. Click the blue “Update Book” button.

5. When the process completes, select GitHub or Bitbucket mode again, and click the blue "Update Book" button.

This should re-establish the connection with GitHub or Bitbucket and the next time you try to make a preview, it should work. If it does not, please email us at hello@leanpub.com.

Finally, if you were writing in Leanpub-Flavored Markdown, you will want to switch back to it on the Markdown Dialect page for your book here:

https://leanpub.com/YOUR_BOOK/manuscript_format
Did this answer your question?