git 错误:无法查找 xyz.com(端口 <none>)(ai_socktype 不支持 Servname)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2871831/
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 04:17:38  来源:igfitidea点击:

git error :Unable to look up xyz.com (port <none>) (Servname not supported for ai_socktype)

git

提问by webminal.org

I'm getting this error message from git.What's this mean ? How to fix?

我从 git 收到此错误消息。这是什么意思?怎么修?

回答by VonC

I don't think this is related to Git, but rather linked to the server on which Git is running.

我不认为这与 Git 相关,而是与运行 Git 的服务器相关联。

See this article

这篇文章

what could this mean: “Servname not supported for ai_socktype“.
After some other tries I have finally seen the problem… NTP ports were not defined in /etc/servicesand this was the root of the error.
The system didn't know how to make ntp connections without that. So I've added the following lines to /etc/services

这意味着什么:“ai_socktype 不支持 Servname”。
经过其他一些尝试,我终于看到了问题...... NTP 端口未定义/etc/services,这是错误的根源。
没有它,系统不知道如何建立 ntp 连接。所以我添加了以下几行/etc/services

ntp             123/tcp
ntp             123/udp

and after this ntpdatestarted working as expected…

在这之后ntpdate开始按预期工作......

Check with your administrator before attempting any modification of those files (unless this is your personal server)

在尝试对这些文件进行任何修改之前,请咨询您的管理员(除非这是您的个人服务器)

回答by speedbaron

I do not think ntp issue has a bearing to the git error; at least in my case.

我不认为 ntp 问题与 git 错误有关;至少在我的情况下。

Here is my case:

这是我的情况:

xxxx@cerberus:~/src$ git clone git://http://cgit.sukimashita.com/sbmanager.git/tree sbmanager
Cloning into sbmanager...
fatal: Unable to look up http (port <none>) (Servname not supported for ai_socktype)

The problem was my syntax for git.

问题是我的 git 语法。

Here is my solution:

这是我的解决方案:

xxxx@cerberus:~/src$ git clone git://git.sukimashita.com/sbmanager.git sbmanager
Cloning into sbmanager...
remote: Counting objects: 764, done.
remote: Compressing objects: 100% (643/643), done.
remote: Total 764 (delta 449), reused 257 (delta 118)
Receiving objects: 100% (764/764), 291.75 KiB | 261 KiB/s, done.
Resolving deltas: 100% (449/449), done.

I think the solution is to check the syntax for git.

我认为解决方案是检查 git 的语法。