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

时间:2017-08-06 00:15:06

标签: git github dns github-pages

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

example.com
foo.example.com

但你能做点什么:

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

或者有办法让新的自定义域重定向到特定的存储库?

1 个答案:

答案 0 :(得分:4)

要在{ "randomId": "1", "partitionKey": "prospect" } 拥有Github页面,您需要foobar.github.io的用户(或#34; organiaztion")帐户和github.com/foobar的存储库。

要在github.com/foobar/foobar.github.io设置Github页面,您需要foobar.github.io/different-repository处的分支gh-pages

要配置github.com/foobar/different-repository以显示example.com,您需要将DNS记录foobar.github.io添加到指向Github Pages IP的域中,并添加内容为&#34的文件A ; example.com" (别忘了添加,提交和推送)。

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

相关问题