<h2id="credentials">Credentials</h2><p>This deployment method has two implementations: <code>ghpages</code> (also known as
<code>ghpages+ssh</code>) which uses SSH and <code>ghpages+https</code> which uses HTTPS. They
use different methods for credentials. For the SSH transport the same
rules apply as for the <ahref="../rsync/"class="ref">rsync deployment method</a>. The HTTPS
transport on the other hand accepts <code>--username</code> and <code>--password</code> which
override the values in the URL.</p>
<divclass="admonition admonition-note"><p>If you have 2-factor authentication set up and you're using HTTPS, instead of your normal password, you will need to use a <ahref="https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/"class="ext">personal access token</a>.</p></div><h2id="behavior">Behavior</h2><p>The way this deployment support works is that it commits a new commit into a
temporary location and pushes it into the <code>gh-pages</code> or <code>master</code> branch
depending on the name of the repository. If you push to <code>username.github.io</code>
then it commits to <code>master</code>, otherwise to <code>gh-pages</code>. This is consistent
with behavior for GitHub Pages.</p>
<h2id="cname-support">CNAME Support</h2><p>If you want to use a custom domain with GitHub pages (also known as a
<ahref="https://en.wikipedia.org/wiki/CNAME"class="ext">CNAME</a>), provide the intended
CNAME in the target URL using the <code>?cname</code> parameter:</p>
Please enable JavaScript to view the <ahref="https://disqus.com/?ref_noscript"
rel="nofollow">comments powered by Disqus.</a>
</noscript>
</div>
</div>
</div>
</div>
</div>
<divclass="bottomsummary">
<divclass="container">
</div>
</div>
<footer>
<divclass="container">
<divclass="row">
<divclass="col-sm-4 icon-bar">
<ahref="https://github.com/lektor/lektor/"title="Lektor on GitHub"
><iclass="fa fa-github"></i></a>
<ahref="https://github.com/lektor/lektor/issues/"title="Report Issues for Lektor"
><iclass="fa fa-bug"></i></a>
<ahref="https://twitter.com/getlektor"title="Find Lektor on Twitter"
><iclass="fa fa-twitter"></i></a>
<ahref="https://gitter.im/lektor/lektor"title="Chat on Gitter"
><iclass="fa fa-comment"></i></a>
<ahref="https://github.com/lektor/lektor-website/tree/master/content/docs/deployment/ghpages/contents.lr"title="View source for this page"><iclass="fa fa-code"></i></a>