raw.githubusercontent.com無法連接

raw.githubusercontent.com無法連接


1. 錯誤狀態

在添加ROS 2 apt存儲庫時老是失敗

sudo apt update && sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

出現

gpg: no valid OpenPGP data found

在這裏插入圖片描述


2. 解決辦法

進入 IPAddress.com
輸入 raw.githubusercontent.com 查詢真實的IP地址
現在查到的是 199.232.68.133
然後編輯修改 hosts 就行

sudo nano /etc/hosts

添加以下內容,保存完事

199.232.68.133 raw.githubusercontent.com

在這裏插入圖片描述


謝謝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章