繁体   English   中英

您可以将多个自定义域添加到多个Github存储库吗?

[英]Can you add multiple custom domains to multiple Github repositories?

我知道您可以创建子域名重定向到不同的存储库,例如:

example.com
foo.example.com

但你能做的事情如下:

example.com > foobar.github.io
differentdomain.com > foobar.github.io/different-repository

或者有一些方法可以将新的自定义域重定向到特定的存储库?

有在Github上的页面foobar.github.io你需要一个用户(或“organiaztion”)帐户github.com/foobar ,并在仓库github.com/foobar/foobar.github.io

有在Github上的页面foobar.github.io/different-repository你需要一个分支gh-pagesgithub.com/foobar/different-repository

要将example.com配置为显示foobar.github.io ,请将DNS记录A添加到指向Github Pages IP的域中,并添加内容为“example.com”的文件github.com/foobar/foobar.github.io/CNAME (不要忘记添加,提交和推送)。

要配置differentdomain.com以显示foobar.github.io/different-repository ,请将DNS记录A添加到指向Github Pages IP的域中,并在gh-pages分支中添加文件github.com/foobar/different-repository/CNAME内容“differentdomain.com”(添加,提交,推送)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM