问题描述

使用百度提供的 STS 获取 bos 临时授权时出现下面的错误:

1
Failed to open TCP connection to sts.bj.baidubce.com:80 (getaddrinfo: Temporary failure in name resolution)

使用 ping sts.bj.baidubce.com

1
ping: sts.bj.baidubce.com: Temporary failure in name resolution

解决方案

/etc/resolv.conf 中添加对应内容

1
2
vim /etc/resolv.conf
nameserver 111.206.37.122

再次尝试 ping sts.bj.baidubce.com

1
PING sts.bj.baidubce.n.shifen.com (111.206.37.122) 56(84) bytes of data.