git Gitlab 的实例域是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/56033742/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:16:23  来源:igfitidea点击:

What is Gitlab's instance domain?

gitgitlab

提问by qq3254

I am trying to test to see if my SSH key was added correctly by following the instructions which are found halfway down the page here.

我正在尝试按照此处页面下方的说明来测试是否正确添加了我的 SSH 密钥。

To test whether your SSH key was added correctly, run the following command in your terminal (replacing gitlab.com with your GitLab's instance domain):

要测试您的 SSH 密钥是否已正确添加,请在终端中运行以下命令(将 gitlab.com 替换为您的 GitLab 实例域):

ssh -T [email protected]

However, I have no idea what my "Gitlab's instance domain" is referring to. I have searched other online but I cannot find anything relevant.

但是,我不知道我的“Gitlab 的实例域”指的是什么。我在网上搜索过其他内容,但找不到任何相关内容。

采纳答案by Shehan Wisumperuma

If you're using Gitlab on gitlab.com then the domain is?gitlab.com, so you should run? ssh -T [email protected]

如果你在 gitlab.com 上使用 Gitlab,那么域是?gitlab.com,所以你应该运行? ssh -T [email protected]

回答by phd

Gitlab can be installed locally so Gitlab instance is what is being run locally. E.g., if one runs Gitlab instance at gitlab.example.netthe domain is gitlab.example.net, and the sshcommand is ssh -T [email protected].

Gitlab 可以安装在本地,所以 Gitlab 实例是在本地运行的。例如,如果在gitlab.example.net域中运行 Gitlab 实例gitlab.example.net,则ssh命令为ssh -T [email protected]

For Gitlab at gitlab.comthe command is ssh -T [email protected].

对于 Gitlab,gitlab.com命令是ssh -T [email protected].

回答by XavierStuvw

This is not a real definition but one section below in that same pageyou can find the example of the content of a file ~/.ssh/config

这不是一个真正的定义,而是在同一页面下面的一个部分您可以找到文件 ~/.ssh/config 内容的示例

# GitLab.com
    Host gitlab.com
    Preferredauthentications publickey
    IdentityFile ~/.ssh/gitlab_com_rsa

# Private GitLab instance
    Host gitlab.company.com
    Preferredauthentications publickey
    IdentityFile ~/.ssh/example_com_rsa

which links the notion of 'instance' to the notions of 'private' and 'company'. Not a foolproof hint, but at least it introduces something clearly distinct from GitLab.com proper.

它将“实例”的概念与“私人”和“公司”的概念联系起来。不是万无一失的提示,但至少它引入了与 GitLab.com 明显不同的内容。

Basically, if you are a vanilla user, it will be just fine to typessh -T [email protected].

基本上,如果您是普通用户,输入ssh -T [email protected].

That instruction is a test before starting the dance. Worked for me also down the line, when I cloned the repository I was interested in with a git clone [email protected]:<myreponame>.git.

该指令是开始跳舞之前的测试。当我使用git clone [email protected]:<myreponame>.git.