Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
strange name resolution problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fpemud
Guru
Guru


Joined: 15 Feb 2012
Posts: 349

PostPosted: Sun Aug 17, 2014 11:15 pm    Post subject: strange name resolution problem Reply with quote

The hostname of my PC is fpemud-workstation.

I can't remember when this problem starts:
Code:
fpemud-workstation repo-fpemud-overlay-private # git pull
fatal: unable to access 'https://fpemud@fpemud-workstation:9420/fpemud-overlay-private.git/': Could not resolve: fpemud-workstation (Domain name not found)

But:
Code:
fpemud-workstation repo-fpemud-overlay-private # ping fpemud-workstation
PING fpemud-workstation (192.168.1.101) 56(84) bytes of data.
64 bytes from fpemud-workstation (192.168.1.101): icmp_seq=1 ttl=64 time=0.043 ms
^C
--- fpemud-workstation ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.043/0.043/0.043/0.000 ms

Code:
fpemud-workstation repo-fpemud-overlay-private # ftp fpemud-workstation
Connected to fpemud-workstation.
220 (vsFTPd 3.0.2)
Name (fpemud-workstation:fpemud): anonymous
530 Please login with USER and PASS.
530 Please login with USER and PASS.
SSL not available
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.


I think it is because git uses curl:
Code:
fpemud-workstation repo-fpemud-overlay-private # curl fpemud-workstation:9420
curl: (6) Could not resolve: fpemud-workstation (Domain name not found)
fpemud-workstation repo-fpemud-overlay-private # curl fpemud-workstation
curl: (6) Could not resolve: fpemud-workstation (Domain name not found)


And my git config:
Code:
fpemud-workstation repo-fpemud-overlay-private # git config -l
user.name=fpemud
user.email=fpemud@sina.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://fpemud@fpemud-workstation:9420/fpemud-overlay-private.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
http.sslverify=false


curl to another host is ok:
Code:
fpemud-workstation repo-fpemud-overlay-private # curl www.google.com.hk
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="zh-HK"><head><meta
...


git to another host is ok either:
Code:
[fpemud@fpemud-workstation ~/codes]$ git clone https://github.com/FreeRDP/FreeRDP
Cloning into 'FreeRDP'...
remote: Counting objects: 63576, done.
remote: Compressing objects: 100% (48/48), done.
Receiving objects:   4% (2647/63576), 508.00 KiB | 127.00 KiB/s   


Really strange. Please anyone can enlighten me?
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 918
Location: Switzerland

PostPosted: Sat Aug 30, 2014 5:49 pm    Post subject: Reply with quote

Hi,

it seems that curl would need the --resolve flag to respect /etc/hosts correctly. But I don't know how to do that withing a git config!?
Another way would be adding that hostname to your local DNS-zone on the DNS server.
Or you could just use 127.0.0.1 as address i guess.

HTH, cheers
_________________
Power to the people!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21498

PostPosted: Sat Aug 30, 2014 10:19 pm    Post subject: Reply with quote

Why are you using https to access localhost? Is the repository not directly readable due to permissions?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum