Git URL映射到自定义域名

huangapple go评论75阅读模式
英文:

Git url mapping to custom domain

问题

如何将 GitHub URL 映射到自定义域名?

示例:

我看到下面的 URL 映射

go get github.com/goji/goji

到这个 URL?

go get goji.io

他们是托管副本还是进行 DNS 重定向?

在 Golang 中,我们使用 URL 路径导入存储库。如果我们使用自定义域名,当我们从 github.com 更改存储库托管到 bitbucket 或反之亦然时,我们无需重写导入路径。

那么如何实现这一点?

英文:

How to map github url to custom domain?

Example:

I saw below url mapping

> go get github.com/goji/goji

to this url?

> go get goji.io

Do they host a replica or DNS redirection?

In golang, we import repositories using url path. If we use a custom domain,
we need not rewrite import paths when we change repository hosting, say from github.com to bitbucket or vice-versa

So how to implement this?

答案1

得分: 3

这篇帖子似乎解释了这个过程。简要来说:

  1. 为你的自定义域名设置一个CNAME记录。
  2. 在你的网页中添加特殊的HTML标记。
英文:

This post seems to explain the process. The short version is:

  1. Set up a CNAME for your custom domain.
  2. Add special HTML markup to your web page.

huangapple
  • 本文由 发表于 2017年2月27日 20:02:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/42485328.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定