Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

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

like image 863
webminal.org Avatar asked Sep 21 '25 03:09

webminal.org


2 Answers

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

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/services and 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

ntp             123/tcp
ntp             123/udp

and after this ntpdate started working as expected…

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

like image 71
VonC Avatar answered Sep 23 '25 07:09

VonC


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

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.

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.

like image 21
speedbaron Avatar answered Sep 23 '25 06:09

speedbaron