如何查询Git库的IP地址
在本地查询Git库的IP地址,可以使用以下命令:
git remote -v
该命令会列出当前Git仓库的所有远程仓库地址,包括其对应的IP地址。例如:
origin 'https://github.com/username/repo.git' (fetch)
origin 'https://github.com/username/repo.git' (push)
其中,'https://github.com/username/repo.git'是远程仓库的地址,可以通过这个地址查询对应的IP地址。可以使用ping命令对远程仓库地址进行ping测试,例如:
ping github.com
该命令会返回远程仓库地址的IP地址,例如:
64 bytes from lb-192-30-253-112-sea.github.com (192.30.253.112): icmp_seq=1 ttl=57 time=5.17 ms
其中,192.30.253.112就是远程仓库地址对应的IP地址。
原文地址: https://www.cveoy.top/t/topic/nkO6 著作权归作者所有。请勿转载和采集!