Skip to content

Instantly share code, notes, and snippets.

@darth-veitcher
Created December 28, 2017 12:35
Show Gist options
  • Save darth-veitcher/e5eb5a12b23bf2b82c6112283c722097 to your computer and use it in GitHub Desktop.
Save darth-veitcher/e5eb5a12b23bf2b82c6112283c722097 to your computer and use it in GitHub Desktop.
publish from gitbook to github.com

Quick note to self about how to connect a gitbook to a github.com repository. I'm using the GitBook Editor but this will also work for a terminal.

Essentially you need to create a personal access token (found in the Developer section of your profile settings) and grant the token the ability to connect to and control repositories. This then gets prefixed to your https:// origin in the manner username:token@.

See below screenshots:

Personal Access Tokens


Grant Scope for Repos


The Token


Add Prefix




This could also be achieved via terminal

git remote add origin https://<username>:<token>@github.com/darth-veitcher/<repository>.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment