3

I am have a git repository on a machine with a dynamic DNS address - its IP address changes once every few days.

Every git operation that involves communicating with the machine yields the following warning:

reverse mapping checking getaddrinfo for 1-2-3-4.isp.net [1.2.3.4] failed - POSSIBLE BREAK-IN ATTEMPT!

I assume this is SSH warning about a possible MITM attack. Is there anyway to suppress said warnings?

Yuval Adam
  • 161,610
  • 92
  • 305
  • 395
  • 1
    im having this problem. on linux the simple answer is in /etc/ssh/ssh_config: `CheckHostIP no`. now to somehow turn on this setting in windows... – Nacht Jan 06 '17 at 13:03
  • @Nacht [`CheckHostIP no` is now the default](https://serverfault.com/a/1109184/115583) in SSH, since the security added was pretty minimal if you're doing PubKey authentication. – Michael Oct 06 '22 at 20:47

1 Answers1

1

You call this from within your network, or from outside? The former case simply doesnt work, because of some restrictions of the NAT-protocol. Just use the local adress, if you are "at home". You can add multiple remotes to your repository, so for fetch, push and so one you can choose which remote it should use.

For example

If you are at home

git remote add homenet 192.168.1.1:/foo/bar/repo.git
git push homenet master

If you are somewhere outside

git remote add outside mynet.dyn.example.com:/foo/bar/repo.git
git push outside master

Another solution would be, if you add your dynamic hostname into your hostsfile (should be /etc/hosts under linux, dont know, where it resides under windows), so your machine will not using the dns for resolving anymore.

192.168.1.1 mynet.dyn.example.com
KingCrunch
  • 128,817
  • 21
  • 151
  • 173
  • Inside the LAN this is obviously not a problem. The issue is with WAN access. Obviously - this means using /etc/hosts is not possible in this case (since this is a dynamic IP we're talking about). – Yuval Adam Apr 06 '11 at 09:05