Sometimes people report issues with GitHub OAuth integration when they are trying to set up a new book in our GitHub writing mode:
You may see this error message when you try to generate a preview:
`Sorry, we could not read from the repository at [your book's GitHub repo path]. Please make sure that Leanpub is a collaborator on that repository. You can edit the repository path in the 'Writing Mode' page under the 'Settings' menu.`
This is usually a matter of overcomplicating things!
Leanpub works by having the leanpub user be a collaborator on your repo. OAuth is complicated, and we try to keep things simple.
Here are the instructions for adding Leanpub as a collaborator on a GitHub repo:
Specifically, you need to go here:
https://github.com/USERNAME/REPO/settings/access
...making sure to replace USERNAME with your GitHub username, and REPO with the actual repo name.
Questions or Feedback
If you have any questions or feedback for this article, please email the Leanpub Team at hello@leanpub.com.
Subscribe to our YouTube channel! Growing our audience there really helps Leanpub authors like you get discovered! Plus you'll learn about other authors, and their experiences writing and publishing.
If you have any feedback or questions about this article, please email the Leanpub team about it at hello@leanpub.com!
If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!
Are you interested in self-publishing, and creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes: http://help.leanpub.com/en/articles/3088382-quick-walkthroughs-for-getting-started-on-a-leanpub-book
Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!
You can also follow Leanpub in lots of other places!

