现象:提交git失败
ssh: Could not resolve hostname gitlab.abc.com: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
bug分析:
*问题1:可能是git没有配置ssh地址*
*问题2:配置了ssh,找不到地址*
*问题3:检查过remotes地址是否正确检查网路也是正常*
解决问题1方式: 添加ssh
cat ~/.ssh/id_rsa.pub 复制到git ssh设置里
解决问题2方式: hosts添加gitlab.abc.com
sudo vim /private/etc/hosts
ping 获取ip,并添加 gitlab.abc.com路径
解决问题3方式:
也是最常出问题的情况,多次尝试,刷新网络