今天在下载webRTC代码的时候,出现以下坑。。。【前提是已经翻好了墙哈。。。】
origin' 'https://webrtc.googlesource.com/src.git'
* Couldn't find host webrtc.googlesource.com in the .netrc file; using defaults
* Trying 74.125.204.82...
* TCP_NODELAY set
* Trying 2404:6800:4008:c04::52...
* TCP_NODELAY set
* Immediate connect fail for 2404:6800:4008:c04::52: No route to host
Google搜索的时候,发现大家会有Couldn't find host *** in the .netrc file的问题,众说纷纭
有的人提示是需要修改git的配置,比如
git config --global http.postbuffer=524288000
git config --global http.maxrequestbuffer=100M
但是酱紫仍然不行。。。还试了一堆别的办法。
后来找到修改.netrc文件【Mac系统位于~/.netrc】并修改之,但格式错误的时候仍会有问题,修改格式后搞定!!
machine webrtc.googlesource.com #要访问的地址的一级域名
login MyUsername #自己的用户名
password MyPassword #自己的密码
machine chromium.googlesource.com #其他地址域名
注意要按照上面的格式喔~~~~~~~